Project

General

Profile

« Previous | Next » 

Revision 30406d66

Added by Marc Dequènes about 15 years ago

  • ID 30406d662870ea3ce7b86adcb1671f0f1be69fa9

[evol] ensure sent mail is correctly formated (using Rails ActionMailer utility methods)

View differences:

postman
if reply_attachments.empty?
mail_reply.set_content_type("text", "plain")
mail_reply.set_disposition("inline")
mail_reply.transfer_encoding = "quoted-printable"
mail_reply.body = reply_txt
mail_reply.quoted_printable_body = reply_txt
else
mail_reply.set_content_type("multipart", "mixed", {'boundary' => TMail.new_boundary})
parts = []
p = TMail::Mail.new
p = CyborgHood::Mail.new
p.set_content_type("text", "plain", {'charset' => "utf-8"})
p.set_disposition("inline")
p.transfer_encoding = "quoted-printable"
p.body = [Mail.normalize_new_lines(reply_txt)].pack("M*")
p.quoted_printable_body = reply_txt
mail_reply.parts << p
reply_attachments.each do |attachment|
p = TMail::Mail.new
p = CyborgHood::Mail.new
p.set_content_type("text", "plain", {'charset' => "utf-8"})
p.set_disposition("attachment", {'filename' => "test.rb"})
p.transfer_encoding = "quoted-printable"
p.body = [Mail.normalize_new_lines(attachment)].pack("M*")
p.quoted_printable_body = attachment
mail_reply.parts << p
end
end

Also available in: Unified diff