Class: MoteSMS::ActionMailerSMSMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- MoteSMS::ActionMailerSMSMailer
- Defined in:
- lib/mote_sms/transports/action_mailer_transport.rb
Overview
Internal: ActionMailer class to forward SMS to recipient.
Instance Method Summary collapse
Instance Method Details
#forward_sms(recipient, sms, options = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/mote_sms/transports/action_mailer_transport.rb', line 6 def forward_sms(recipient, sms, = {}) subject = [:subject].presence || "SMS to #{sms.to.map(&:to_s).join(', ')}" from = [:from].presence || "#{sms.from} <#{recipient}>" mail .merge(to: recipient, from: from, subject: subject, body: sms.body) end |