27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/capistrano/ext/mailer.rb', line 27
def notify(textbody, options, mail_attachments)
mail_attachments.each do |filename, contents|
if File.exists?(filename.to_s)
attachments[File.basename(filename.to_s)] = File.read(filename.to_s)
elsif File.exists?(contents.to_s)
attachments[File.basename(contents.to_s)] = File.read(contents.to_s)
else
attachments[File.basename(filename.to_s)] = contents
end
end
mail(options) do |format|
format.text { render :text => textbody }
end
end
|