Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def send_email
mg_client = Mailgun::Client.new("YOUR-API-KEY")
message_params = {
from: 'robin@percy.pw',
to: IronWorker.payload['email'],
subject: 'Your daily developer articles!',
text: email_body()
}
result = mg_client.send_message('YOUR-SANDBOX-URL.mailgun.org', message_params).to_h!
message_id = result['id']
message = result['message']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.