buildbox- Rehackable components for writing buildbots and test harnesses.

Safe HaskellNone



Sending email. If you're on a system with a working sendmail then use that. Otherwise, the stand-alone msmtp server is easy to set up. Get msmtp here:



data Mail Source

An email message that we can send.


data Mailer Source

An external mailer that can send messages. Also contains mail server info if needed.



Send the mail by writing to the stdin of this command. On many systems the command sendmail will be aliased to an appropriate wrapper for whatever Mail Transfer Agent (MTA) you have installed.


Send mail via MSMTP, which is a stand-alone SMTP sender. This might be be easier to set up if you don't have a real MTA installed. Get it from


createMailWithCurrentTime Source


:: String

'from' field. Should be an email address.

-> String

'to' field. Should be an email address.

-> String

Subject line.

-> String

Message body.

-> Build Mail 

Create a mail with a given from, to, subject and body. Fill in the date and message id based on the current time. Valid dates and message ids are needed to prevent the mail being bounced by anti-spam systems.

renderMail :: Mail -> Doc Source

Render an email message as a string.

sendMailWithMailer :: Mail -> Mailer -> Build () Source

Send a mail message.