Revision cdab9091
Added by Marc Dequènes almost 11 years ago
bin/postman | ||
---|---|---|
if reply_attachments.empty?
|
||
transcript_part = mail_reply
|
||
else
|
||
mail_reply.parts.clear
|
||
|
||
p = CyborgHood::Mail.blank
|
||
transcript_part = p
|
||
mail_reply.parts << p
|
||
transcript_part = ::Mail::Part.new
|
||
mail_reply.add_part(transcript_part)
|
||
|
||
reply_attachments.each do |attachment|
|
||
p = CyborgHood::Mail.blank
|
||
p.set_content_type("text", "plain", {'charset' => "utf-8"})
|
||
p.set_disposition("attachment", {'filename' => attachment.filename})
|
||
p.quoted_printable_body = attachment.content
|
||
mail_reply.parts << p
|
||
mail_reply.attachments[attachment.filename] = {
|
||
:mime_type => 'text/plain',
|
||
:content => attachment.content
|
||
}
|
||
end
|
||
end
|
||
|
||
# insert transcript
|
||
transcript_part.set_content_type("text", "plain", {'charset' => 'utf-8', 'format' => 'flowed'})
|
||
transcript_part.set_disposition("inline")
|
||
transcript_part.quoted_printable_body = reply_txt + mail_reply.default_body_signature
|
||
transcript_part.content_type = 'text/plain; charset="UTF-8"'
|
||
transcript_part.content_disposition = 'inline; format="flowed"'
|
||
transcript_part.body = reply_txt + mail_reply.default_body_signature
|
||
|
||
# send reply
|
||
logger.debug "Sending mail"
|
Also available in: Unified diff
[evol] more TMail->Mail adaptations for main processing