Frederick Cheung wrote:
> I've got multipart html emails that work just fine. What are you doing
> in your mailer ?
>
> Fred
Nothing special. This is the code:
*** notifications.rb:
def alert
@sent_on = Time.now
@from = '[EMAIL PROTECTED]'
@recipients = '[EMAIL PROTECTED]'
@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: [EMAIL PROTECTED]:
[EMAIL PROTECTED]: 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<div
style=3D\"color:red\">test</div>=\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<div
style=3D\"color:red\">test</div>=\n\r\n--mimepart_48f250492c08b_2098..fdbfb1b7e3e0--\r\n"
As you can see is: <div style=3D\"color:red\">test</div>
It adds that 3D (ascii: '=') and that cause the wrong rendering on a lot
of email clients :(
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---