Module | Mack::Notifier::DeliveryHandlers::SendMail |
In: |
lib/mack-notifier/delivery_handlers/sendmail.rb
|
Delivers Mack::Notifier objects using sendmail.
# File lib/mack-notifier/delivery_handlers/sendmail.rb, line 7 7: def self.deliver(mail) 8: sendmail_settings = app_config.notifier.sendmail_settings 9: sendmail_settings.symbolize_keys! 10: sendmail_args = sendmail_settings[:arguments] 11: sendmail_args += " -f \"#{mail.reply_to}\"" if mail.reply_to 12: IO.popen("#{sendmail_settings[:location]} #{sendmail_args}","w+") do |sm| 13: sm.print(mail.deliverable.gsub(/\r/, '')) 14: sm.flush 15: end 16: end