diff options
author | Peter Kozak <spag@golwen.net> | 2013-08-01 13:26:58 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-08-01 13:26:58 +0200 |
commit | 2e9694ea316ea5a5c5008ea0b9f8b18bb909db73 (patch) | |
tree | 553f309e0aabc4aa83739216c2c65a4afbfe2a29 /app/mailers/notifications.rb | |
parent | 722ae8372ae69e443fc6a1e7673fca4b7bb54e4f (diff) |
display file name
Diffstat (limited to 'app/mailers/notifications.rb')
-rw-r--r-- | app/mailers/notifications.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index 44a6a7a..ec81d35 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -55,7 +55,8 @@ class Notifications < ActionMailer::Base if caller_number.blank? caller_number = 'anonymous' end - attachments["#{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.strftime('%Y%m%d-%H%M%S')}-#{caller_number}.wav"] = File.read(freeswitch_voicemail_msg.file_path) + @voicemail[:file_name] = "#{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.strftime('%Y%m%d-%H%M%S')}-#{caller_number}.wav" + attachments[@voicemail[:file_name]] = File.read(freeswitch_voicemail_msg.file_path) end mail(from: Tenant.find(GsParameter.get('DEFAULT_API_TENANT_ID')).from_field_voicemail_email, to: email, :subject => "New Voicemail from #{@voicemail[:from]}, received #{Time.at(freeswitch_voicemail_msg.created_epoch).getlocal.to_s}") |