<div align=3D

The HTML for my e-newsletter is supposed to be <div align=“center”>, instead it’s showing up as <div align=3D"center"> when viewed in a mail client. ALL of the code looks this way.

Anybody know what this is all about?

“3D” is the hex for the equal sign. But that would be like it has 2 and 1 is getting changed. :hmmm:

here’s what’s really strange.

this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Testing</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 20px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #fff;
	height: 100%;
	min-height: 100%;
}
body, td, th {
	color: #333;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}
a:link {
	color: #f60;
}
a:visited {
	color: #f93;
}
a:hover {
	color: #f00;
}
a:active {
	color: #f00;
}
h1, h2, h3, h4, h5, h6 {
	font-family: Tahoma, Helvetica, Arial, sans-serif;
	margin-top: 0px;
	margin-bottom: 1px;
}
h1 {
	font-size: 18px;
}
h2 {
	font-size: 12px;
}
table {
	border-collapse: collapse;
}
.footer {
	font-size: 9px;
}
-->
</style></head>
<body>

gets turned into this when sending as an email

--_=_swift-203723637246f7de5f471251.02494850_=_
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww=
w.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h=
tml xmlns=3D"http://www.w3.org/1999/xhtml">
<h=
ead>
<m=
eta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DISO-8859-=
1" />
<t=
itle>Testing</title>
<s=
tyle type=3D"text/css">
<!=
--
bo=
dy {
	m=
argin-left: 0px;
	m=
argin-top: 20px;
	m=
argin-right: 0px;
	m=
argin-bottom: 0px;
	b=
ackground-color: #fff;
	h=
eight: 100%;
	m=
in-height: 100%;
}
--_=_swift-203723637246f7de5f471251.02494850_=_--

Now, this only happens every once-in-a-while. I’m looking through my code and can not find anything wrong. Obviously there is, but what?

I wonder if has to do with

Content-Transfer-Encoding: quoted-printable

For my newsletter I only have “MIME-Version: 1.0” and “Content-Type: text/html” and it’s OK. But then again I don’t have much mark-up either. It seems that having a charset is a good idea.
Are there other Content-Transfer-Encoding values that might be more reliable?

EDIT:
I just looked at the MSDN page and noticed “Any character, except the CRLF sequence, can be represented by an equal sign followed by a two-digit hexadecimal representation.” and “The 76-character limit does not include the CRLF sequence or the equal sign.” :hmmm again:

found the problem. It was with the encoding. I’m not sure which encoding is being used right now (Latin 1 or UTF-8), but setting the encoding in swiftmailer solved the problem.

$message->setEncoding(“8bit”);

thanks for your time and effort!

Thanks for posting your solution. If I ever spruce up my newsletter I may need to know that.