You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Murray edited this page Jan 15, 2016
·
2 revisions
For now, this is just a filler page. We'll be including information on how to add email sending capability to a Yesod app, what options you have for sending on the server, and how to set up a simple development option.
Quick guide
To send a simple email in a handler:
importqualifiedNetwork.Mail.MimeasMail
liftIO $Mail.renderSendMail $Mail.simpleMail'
(Mail.AddressNothing"dave.derp@gmail.com") -- To address, Nothing can be replaced with a name
(Mail.Address (Just"King of My Site") "from.address@mysite.com") -- From address"Deus Vult"-- Subject"Nobiscum Deus"-- Body of the email
renderSendMail will use the sendmail available on your machine.
In order to send emails from an external host(for example gmail) you can install msmtp.
Make sure sendmail points to the msmtp executable and is configured to use your email account.