This project is archived and is in readonly mode.
Email multipart 2 years old bug
Reported by xdmx | October 12th, 2008 @ 12:26 AM | in 3.x
Hi, i've found this bug, and it seems it's 2 years old, not yet corrected. http://www.ruby-forum.com/topic/...
Reporting that post:
Hi,
I use the multipart functionality from the action mailer.
But when i send an html message, my outlook opens the mail and shows this:
--mimepart_4443b76d12268_6f34..fdacc616831e6 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline
<!!Message> = = --mimepart_4443b76d12268_6f34..fdacc616831e6--
No html will appear. When i look in the source every tag is changed to
Comments and changes to this ticket
-
xdmx October 12th, 2008 @ 08:34 PM
Some code to test it:
*** notifications.rb:
def alert
@sent_on = Time.now @from = 'test@test.com' @recipients = 'test@test.com' @subject = 'test' @body = {:reqst => '<div style="color:red">test</div>'}
end
*** alert.text.plain.erb:
<%= @reqst %>
*** alert.text.html.erb:
<%= @reqst %>
*** console:
x = Notifications.create_alert => #<TMail::Mail port=#<TMail::StringPort:id=0x..fdb902954> bodyport=#<TMail::StringPort:id=0x..fdb8fff88>> x.encoded => "Date: Sun, 12 Oct 2008 21:30:13 +0200\r\nFrom: test@test.com\r\nTo: test@test.com\r\nSubject: test\r\nMime-Version: 1.0\r\nContent-Type: multipart/alternative; boundary=mimepart_48f250492c08b_2098..fdbfb1b7e3e0\r\n\r\n\r\n--mimepart_48f250492c08b_2098..fdbfb1b7e3e0\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: Quoted-printable\r\nContent-Disposition: inline\r\n\r\n
test=\n\r\n--mimepart_48f250492c08b_2098..fdbfb1b7e3e0\r\nContent-Type: text/html; charset=utf-8\r\nContent-Transfer-Encoding: Quoted-printable\r\nContent-Disposition: inline\r\n\r\ntest=\n\r\n--mimepart_48f250492c08b_2098..fdbfb1b7e3e0--\r\n"As you can see is:
testIt adds that 3D (ascii: '=') and that cause the wrong rendering on a lot of email clients :( -
Pratik January 18th, 2009 @ 06:58 AM
- State changed from new to incomplete
Missing a patch/failing test.
-
Theo Cushion March 16th, 2009 @ 12:33 PM
I've come across this on the formatting of links in text/plain emails. It is the encoding method "quoted-printable" that is responsible for converting '=' to '=3D'.
I found an explanation here: http://ask-leo.com/why_does_my_e...
So it would appear that this is not a bug, and probably a problem with the email client.
-
Barry Hess April 13th, 2009 @ 05:04 PM
Hmmm…I'm running into this as well. I have a multipart email that is sending "text/html" as one part. In order to fix, I need to set the part's transfer_encoding equal to "none" (p.transfer_encoding = "none" within a part block).
Since Rails is sending the email, it sort of is the client.
-
Barry Hess April 17th, 2009 @ 04:52 PM
In process of writing a patch. Then I just realized @Theo probably meant the '=3D's are fine and the problem is email clients that cannot interpret them are buggy.
I can confirm the '=3D's, but if the Rails team is saying the '=3D's are fine, then there is no reason to keep this ticket open.
-
Barry Hess April 22nd, 2009 @ 04:31 PM
Further reason to close this and forget it ever happened -
We've found that transfer_encoding set to "none" triggers some spam filters out there to spam our emails. The best alternative seems to be to set to "none" in development so emails look nice in the console log and leave at "quoted-printable" in production and test.
-
Rohit Arondekar June 15th, 2010 @ 11:35 AM
- State changed from incomplete to wontfix
- Assigned user set to Mikel Lindsaar
Closing ticket based on Barry Hess's comments. If anybody thinks this ticket should remain open, just make a comment and I'll re-open it.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>