simbolos signos signo pesos lugar lista interrogacion especiales caracteres acute acentos aacute php html email html-email

php - signos - Signo de exclamación en el correo electrónico HTML



simbolos html (4)

Elimine todo el estilo de CSS, muchos motores de procesamiento de correo electrónico fallan con él. Use un diseño simple de mesa vieja.

Use <font color="black">blah</font> lugar de color de estilo, use <table cellpadding="10"> lugar de padding de estilo, use bgcolor lugar de estilo background-color .

Establezca bgcolor en TABLA completa, no en TD.

Me está costando formatear una tabla en un correo electrónico HTML. Parece que siempre hay una celda que no tiene el color de fondo o espacios blancos extraños.

Aquí está el código (en php) -

$subject.="<br/><br/><table style=/"width:585px;/" ><tr><td style=/"padding:10px;background-color:#113797;color:white;/">New & Used Vehicles</td><td style=/"padding:10px;background-color:#113797;color:white;/">Term in Months</td><td style=/"padding:10px;background-color:#113797;color:white;/">APR* As Low As</td><td style=/"padding:10px;background-color:#113797;color:white;/">Monthly Payment Per $1000 Borrowed</td></tr>"; $result = mysql_query("SELECT * FROM rates WHERE ID>=''32'' AND ID <=''39''"); while($row = mysql_fetch_array($result)) { $subject.= "<tr><td BGCOLOR=/"#e5f1ff/" style=/"padding:10px;color:black;/">" . $row[''name''] . "</td>"; $subject.= "<td BGCOLOR=/"#e5f1ff/" style=/"padding:10px;/">" . $row[''term''] . "</td>"; $subject.= "<td BGCOLOR=/"#e5f1ff/" style=/"padding:10px;/">" . $row[''apr''] . "</td>"; $subject.= "<td BGCOLOR=/"#e5f1ff/" style=/"padding:10px;/">" . $row[''per_1000''] . "</td></tr>"; } $subject.= "</table>";

Así que he probado tanto css background como html y ambos crean algo que se ve mal. También probé Doctypes.

Así es como se ve mi código de correo.

mail( "[email protected]", "$title2", "$subject" , "Content-type: text/html;/r/nFrom: [email protected]" );

Esto es lo que muestra como. Ver el espacio deshonesto?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>Check out the low rates.<table style="width:585px;" ><tr><td style="padding:10px;background-color:#113797;color:white;">New &amp; Used Vehicles</td><td style="padding:10px;background-color:#113797;color:white;">Term in Months</td><td style="padding:10px;background-color:#113797;color:white;">APR* As Low As</td><td style="padding:10px;background-color:#113797;color:white;">Monthly Payment Per $1000 Borrowed</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2008 and NEWER Vehicle Purchases</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">Up to 72 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">3.24%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$17.28</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2008 and NEWER Vehicle! Purchases</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">64 - 72 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">4.29%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$15.69</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2007 and OLDER Vehicle Purchases</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">Up to 72 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">5.49%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$18.20</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2007 and OLDER Vehicle Purchases</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">64 - 72 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">5.99%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$16.46</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2011 &amp; 2010 REFINANCES</td><td bgcolor=! "#e5f1ff" style="padding:10px;height:100%;">Up to 63 Months</t! d><td bg color="#e5f1ff" style="padding:10px;height:100%;">4.99%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$18.08</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2011 &amp; 2010 REFINANCES</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">64 - 72 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">5.49%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$16.34</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2008 - 2009 REFINANCES</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">Up to 60 Months</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">5.99%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$19.33</td></tr><tr><td bgcolor="#e5f1ff" style="padding:10px;color:black;height:100%;">2007 &amp; older Vehicle REFINANCE</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">Up to 60 Months</td><td bgcolor="#e5f1ff" style="padding:10px! ;height:100%;">6.99%</td><td bgcolor="#e5f1ff" style="padding:10px;height:100%;">$19.80</td></tr></table></body></html>


Odio responder a mi propia pregunta, pero encontré una solución al problema, y ​​con suerte alguien puede usar esta solución para deshacerse de los dolores de cabeza que esto causa.

El problema está causado por el uso de la función mail (). Cuando trato de enviar el correo electrónico, tengo una larga cadena de código html. DE HECHO, DEMASIADO LARGO! Cuando paso más de 78 caracteres, ¡BANG! aparece y luego toma con mi html o css. RFC 2822

La resolución es cambiarlo a base-64 codificar los datos o agregar / r / n en mis largas líneas de código html. De cualquier forma, se resuelve el problema.

Gracias por ayudar a todos!


Parece que no hay retorno en las celdas ofensivas. Por lo tanto, intente agregarle altura: 100% para que estén completamente llenas. Puedes arreglar esto ajustando este código

<td style=/"padding:10px;background-color:#113797;color:white;/">

A

<td style=/"padding:10px;background-color:#113797;color:white;height:100%;/">

Esto debería solucionar tu problema.


Aquí hay un ejemplo de cómo crear un correo electrónico codificado en Base64 en:

<?php $html = "<p>The <b>quick</b> <em>brown</em> <u>fox</u> jumped right over the lazy dog.</p><hr />"; $to = "[email protected]"; $cc = "[email protected]"; $bcc = "[email protected]"; $from = "[email protected]"; $subject = "This is a MIME encoded email"; $boundary = str_replace(" ", "", date(''l jS /of F Y h i s A'')); $newline = "/r/n"; $headers = "From: $from$newline". "Cc: $cc$newline". "Bcc: $bcc$newline". "MIME-Version: 1.0$newline". "Content-Type: multipart/alternative;". "boundary = /"$boundary/"$newline$newline". "--$boundary$newline". "Content-Type: text/html; charset=ISO-8859-1$newline". "Content-Transfer-Encoding: base64$newline$newline"; $headers .= rtrim(chunk_split(base64_encode($html))); mail($to,$subject,"",$headers); ?>

Encontré este código en el siguiente sitio:

https://ctrlq.org/code/19840-base64-encoded-email

Configurar sus correos electrónicos para que estén Basados64 Codificados eliminará el ''!'' Aleatorio siendo agregado a los correos electrónicos.