lib/capistrano/notifier/mail.rb in capistrano-notifier-0.2.0 vs lib/capistrano/notifier/mail.rb in capistrano-notifier-0.2.1
- old
+ new
@@ -63,10 +63,11 @@
notifier.delivery_method = notify_method
notifier.deliver_notice(text, from, subject, to)
end
def perform_with_action_mailer(notifier = Capistrano::Notifier::Mailer)
+ notifier.smtp_settings = smtp_settings
notifier.notice(text, from, subject, to, notify_method).deliver
end
def body
<<-BODY.gsub(/^ {6}/, '')
@@ -110,9 +111,13 @@
)
end
def notify_method
cap.notifier_mail_options[:method]
+ end
+
+ def smtp_settings
+ cap.notifier_mail_options[:smtp_settings]
end
def subject
"#{application.titleize} branch #{branch} deployed to #{stage}"
end