149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# File 'lib/inkcite/mailer.rb', line 149
def send! config, view, subject, opt
from = config[:from]
mg_client = Mailgun::Client.new config[:'api-key']
message_params = {
:from => from,
:to => opt[:to] || from,
:subject => subject,
:html => view.render!
}
message_params[:cc] = opt[:cc] unless opt[:cc].blank?
message_params[:bcc] = from if opt[:bcc] == true
mg_client.send_message config[:domain], message_params
end
|