Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Simple example on how to send emails from Pharo using MandrillApp client
"Get client at http://smalltalkhub.com/#!/~NorbertHartl/Mandrill"
"Set the api key only once."
MandrillClient apiKey: 'yourApiKeyGoesHere'.
(MandrillMessage new
addRecipient: (MandrillRecipient new email: 'alice@there.com');
fromName: 'Bob';
fromEmail: 'bob@yourdomain.com';
subject: 'Sending mails from Pharo';
text: 'This is the plain text body';
html: '<h1>But can have content in HTML!</h1>') send
"You can inspect the object returned to checked whether it succeeded or not."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment