16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/vmail/reply_templating.rb', line 16
def
reply_subject = current_message.subject
if reply_subject !~ /Re: /
reply_subject = "Re: #{reply_subject}"
end
date = DateTime.parse(current_message.date)
sender = current_message.sender
= date ? "On #{date.strftime('%a, %b %d, %Y at %I:%M %p')}, #{sender} wrote:\n\n" : "#{sender} wrote:\n"
reply_body = +
( current_message.plaintext.split(/^-+$/,2)[1].strip.gsub(/^(?=>)/, ">").gsub(/^(?!>)/, "> ") )
{
'references' => current_message.message_id,
'from' => "#@name <#@username>",
'to' => reply_recipient,
'cc' => reply_cc,
'bcc' => @always_bcc,
'subject' => reply_subject,
'body' => reply_body
}
rescue
$logger.debug $!
raise
end
|