module SendableRails::ActionMailerWithSendable

Public Instance Methods

sendable_mail(params = {}) click to toggle source
# File lib/sendable_rails/action_mailer_ext.rb, line 5
def sendable_mail(params = {})
  data = {}
  instance_variables.each do |key|
    if key[0..1] != '@_'
      name = key[1..-1]
      data[name] = instance_variable_get(key)
    end
  end

  Sendable.client.email(default_params.merge(params).merge(data: data))
end