buildbox-1.0.1.1: Rehackable components for writing buildbots and test harnesses.

BuildBox.Command.Mail

Description

Sending email. We've got baked in support for msmtp, which is easy to set up. Adding support for other mailers should be easy. Get msmtp here: http://msmtp.sourceforge.net

Synopsis

Documentation

data Mail Source

An email message that we can send.

Instances

data Mailer Source

An external mailer that can send messages. Also contains mail server info if needed. We only support msmtp at the moment.

Constructors

MailerMSMTP 

Instances

createMailWithCurrentTimeSource

Arguments

:: 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 spambots.

renderMail :: Mail -> DocSource

Render an email message as a string.

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

Send a mail message.