Actionmailler corrupting emails

Hi All,

I have a problem with actionmailer corrupting my html emails. It is
adding the character ‘3D’ before any quotes (single or double) in my
source and smattering ‘=’ characters throughout as well. Very
strange. Here’s an example from one of the emails:


Thank you for order with Alien8 Recordings. Below you will find a rec= eipt for your order.

<h2 id=3D"h2_artist">Order 59</h2>
	=

		<div class=3D"myform" style=3D"float:right; width: 50%;">
			<h4>Shipping Info</h4>

			<div class=3D"myfield">234 6th Ave</div>
			<div class=3D"myfield">Suite 340</div>
			<div class=3D"myfield">New York</div>
			<div class=3D"myfield"></div>
			<div class=3D"myfield">10010</div>
			<div class=3D"myfield">United States</div>
		</div>
	=

	=

Any ideas what could be causing this? Someone on irc mentioned an
issue with ruby cgi library, but wasn’t sure how to fix it. My code
is below.

Thanks in advance,
Sean

Here’s my code:

development.rb

Smtp config

ActionMailer::Base.server_settings = {
:address => “smtp.b2b2c.ca”,
:port => 25,
:domain => ‘www.mywebsite.com
}
ActionMailer::Base.default_charset = “utf-8”

notfier.rb

class Notifier < ActionMailer::Base

def order_confirmation(order)
@recipients = order.customer.email
@from = “[email protected]
@subject = “Alien8 Recordings Store Order Confirmation Number #
{order.id}”
@body[“order”] = order
end

end

order_confirmation.text.html.rhtml

Thank you for order with Alien8 Recordings. Below you will find a receipt for your order.

<%= render :partial => '../admin/orders/order_display' %>

I’m still trying to figure this one out… someone on IRC suggested
it’s a utf8 issue, however I testing sending some chinese characters
and they were rendered fine. It’s the = symbol only that is being
rendered as =3D… any ideas?

Thanks,
Sean

On 10-Aug-06, at 8:41 PM, Sean O’Hara wrote:

=
Thanks in advance, :domain => 'www.mywebsite.com' {order.id}" charset=utf-8" />

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


ALIEN8 RECORDINGS
P.O. BOX 666, STATION R
MONTREAL, QC
CANADA, H2S 3L1

http://www.alien8recordings.com

Has no one experienced such a problem before? I’m really at a loss
as to what is causing it.

Thanks,
Sean

On 10-Aug-06, at 8:41 PM, Sean O’Hara wrote:

=
Thanks in advance, :domain => 'www.mywebsite.com' {order.id}" charset=utf-8" />

[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


ALIEN8 RECORDINGS
P.O. BOX 666, STATION R
MONTREAL, QC
CANADA, H2S 3L1

http://www.alien8recordings.com

I am having the same problem -

It looks like an encoding issue (0x3D is the equal sign) - likely a
mis-placed regex.

I’ve been caught-up on other bigger-problems, but I suspect we’re
looking at a bug. grin. I didn’t find a ticket post btw.

Jodi

Alien8 Recordings wrote:

I’m still trying to figure this one out… someone on IRC suggested
it’s
a utf8 issue, however I testing sending some chinese characters and
they
were rendered fine. It’s the = symbol only that is being rendered as
=3D… any ideas?

That could have been me on IRC. Upon further thinking, the pattern
isn’t UTF-8 but Quoted-Printable (QP) MIME encoding.

QP escapes non-ascii-7 characters using = (equal sign), so any literal
‘=’ in your string will have to be escaped to ‘=3D’ (the QP escaped-hex
encoding of ‘=’).

Actionmailer isn’t corrupting your email, it’s properly encoding to
conservatively pass the message through all the transport agents that
may handle it.

It should be properly setting a mime-type so the end point knows to
interpret the text as Quoted-Printable. If you’re seeing literal ‘=3D’
at the end point, either some encoding header has been lost or the end
client is incorrectly rendering the mime-type.

For a tutorial on character encoding issues, see
http://www.cs.tut.fi/~jkorpela/chars.html


Devin Ben-Hur 503/860-4114 mailto:[email protected]

You may not have noticed, but we live in one of the safest,
most peaceful, times in human history. In the US, the three
leading causes of death are: killing yourself, killing yourself,
and killing yourself http://tinyurl.com/msxhq.


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.9/417 - Release Date:
8/11/2006