I’m getting =0A inside my emails where there should be a line break.
@article = DB[:posts][:nodeview_id => view, :nodeview => 'article']
Pony.mail(:html_body => @article[:content], :reply_to => @email, :subject => "New article #{@article[:title]}", :headers => { "X-MC-Tags" => "feedback" } )
And #@article[:content]} in this context, is
apples
bananas
inside the database, no \n or <br> tags.
Here’s how Pony is configured.
Pony.options = { :from => 'Compesh <donotreply@compesh.com>', :to => 'blahblahblah@emails.com',
:via => :smtp, :via_options => {
:address => 'smtp.mandrillapp.com', :port => '587',
:user_name => 'XXX', :password => 'XXXXXX'
},
:headers => { "X-MC-AutoText" => "yes" }, :charset => 'utf-8'
}
But in my emails I get
apples=0Abananas
Pony doesn’t let me choose the content type, I don’t think.
I managed to fix this by converting newlines to a
<br>tag. It turns out it had nothing to do with the content type or encoding of the email at a..This specially general regex function, has a way of covering DOS, *NIX, Mac and accidental invalid line endings.