Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Email multipart 2 years old bug

#1204

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

Reported by xdmx · October 12th, 2008 @ 12:26 AM

State: wontfix
Milestone: 3.x
Assigned to: Mikel Lindsaar Mikel Lindsaar
Importance: none

Activity

  1. xdmx
    xdmx

    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\n
    test
    =\n\r\n--mimepart_48f250492c08b_2098..fdbfb1b7e3e0--\r\n"

    As you can see is:

    test
    It adds that 3D (ascii: '=') and that cause the wrong rendering on a lot of email clients :(

    October 12th, 2008 @ 08:34 PM

  2. Pratik
    Pratik
    • State changed from new to incomplete

    Missing a patch/failing test.

    January 18th, 2009 @ 06:58 AM

  3. Theo Cushion
    Theo Cushion

    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.

    March 16th, 2009 @ 12:33 PM

  4. Barry Hess
    Barry Hess

    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.

    April 13th, 2009 @ 05:04 PM

  5. Barry Hess
    Barry Hess

    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.

    April 17th, 2009 @ 04:52 PM

  6. Barry Hess
    Barry Hess

    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.

    April 22nd, 2009 @ 04:31 PM

  7. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  8. Rohit Arondekar
    Rohit Arondekar
    • 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.

    June 15th, 2010 @ 11:35 AM

  9. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 9th, 2010 @ 09:54 PM