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

Safe HaskellNone

BuildBox.Command.Mail

Description

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

Constructors

MailerSendmail

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.

MailerMSMTP

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 http:msmtp.sourceforge.net/

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 anti-spam systems.

renderMail :: Mail -> DocSource

Render an email message as a string.

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

Send a mail message.