Skip to content

Instantly share code, notes, and snippets.

@jostster
jostster / send_email.py
Created April 29, 2016 00:56 — forked from thinrhino/send_email.py
Send mails using Mandrill API
from mandrill import Mandrill
import base64
mail_client = Mandrill('<api_key>')
frm_email = 'email@email.com'
frm_name = 'Given Name'
# Sending image as attachment
img_attachment = base64.b64encode(open('~/sample_image.jpg', 'rb').read())