Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send mail to an email address using Yesod

I'm unable to find any good documentation or examples of how to send an mail to an email address using Yesod.

More practically, I'll extract the information the user typed inside a simple form (name, age, body of message) and send this information as a mail to an email address.

I'm kind of lost in this task.

like image 275
kolam Avatar asked Mar 20 '14 15:03

kolam


2 Answers

There are three packages I'd recommend you look at:

  • mime-mail, which is a package for composing emails and rendering to bytestrings. It can also send via the system sendmail executable.
  • mime-mail-ses, which can send mail from mime-mail via Amazon SES.
  • smtp-mail, which can send mail from mime-mail via an SMTP connection.

There is some discussion about sending email in the auth chapter of the Yesod book.

like image 129
Michael Snoyman Avatar answered Oct 22 '22 00:10

Michael Snoyman


Yesod doesn't have mailing functions. You have to use other packages outside Yesod.

Maybe you'd want to check this short answer: https://stackoverflow.com/a/11763447/1744195

like image 30
Ariel D. Moya Sequeira Avatar answered Oct 22 '22 02:10

Ariel D. Moya Sequeira