def initialize opts={}
header = {
"From" => AccountManager.default_account.full_address,
}
header["Subject"] =
if opts[:message]
"Fwd: " + opts[:message].subj
elsif opts[:attachments]
"Fwd: " + opts[:attachments].keys.join(", ")
end
header["To"] = opts[:to].map { |p| p.full_address }.join(", ") if opts[:to]
header["Cc"] = opts[:cc].map { |p| p.full_address }.join(", ") if opts[:cc]
header["Bcc"] = opts[:bcc].map { |p| p.full_address }.join(", ") if opts[:bcc]
body =
if opts[:message]
forward_body_lines(opts[:message])
elsif opts[:attachments]
["Note: #{opts[:attachments].size.pluralize 'attachment'}."]
end
super :header => header, :body => body, :attachments => opts[:attachments]
end