|
| Network.SMTP.ClientSession |
|
|
| Description |
| A pure SMTP client state machine.
|
|
| Synopsis |
|
|
|
| Documentation |
|
|
| :: String | Domain name used in EHLO command
| | -> [Message] | List of messges to send
| | -> SMTPState | | | Construct a pure state machine for an SMTP client session. Caller must
handle I/O. The message body may use either "\n" or "\r\n" for an
end-of-line marker.
|
|
|
|
| Constructors | | SMTPState | | | smtpOutQueue :: [String] | Step 1. Caller must output any lines queued up in this list. They do not
have end-of-line characters, so the caller must add "\r\n" on the
end (as required by RFC2821 - not just "\n").
| | smtpReceive :: String -> SMTPState -> SMTPState | Step 2. When sends are completed, the caller should wait for a line from
the SMTP server, strip the "\n" end-of-line characters, and pass the
line to this function for processing.
| | smtpSuccess :: Bool | Step 3. Check if this is True, which indicates that the SMTP session
has completed successfully and there is no more work to do.
| | smtpFailure :: Maybe String | Step 4. Check if this is Just err, which indicates that a protocol error
has occurred, and that the caller must terminate the session.
| | smtpStatuses :: [Maybe SmtpReply] | A list containing a failure status for each message that has been sent so far,
where each element corresponds to one in the list of messages.
If the SMTP session fails part-way through, this list is likely to be
shorter than the input messages list.
Nothing means success, and Just x is a failure status returned by
the SMTP server.
|
|
|
|
|
|
An SMTP reply is a three-digit return code plus some
waste of bandwidth called "comments". This is what the
list of strings is for; one string per line in the reply.
show will append an "\r\n" end-of-line marker to
each entry in that list, so that the resulting string is
ready to be sent back to the peer.
Here is an example:
*Rfc2821> print $ Reply (Code Success MailSystem 0)
["worked", "like", "a charm" ]
250-worked
250-like
250 a charm
If the message is [], you'll get a really helpful
default text.
| | Constructors | | Instances | |
|
|
|
| Constructors | | Instances | |
|
|
|
| Constructors | | Unused0 | | | PreliminarySuccess | | | Success | | | IntermediateSuccess | | | TransientFailure | | | PermanentFailure | |
| Instances | |
|
|
|
| Constructors | | Syntax | | | Information | | | Connection | | | Unspecified3 | | | Unspecified4 | | | MailSystem | |
| Instances | |
|
|
|
| This data type repesents a parsed Internet Message as defined in
this RFC. It consists of an arbitrary number of header lines,
represented in the Field data type, and a message body, which may
be empty.
| | Constructors | | Instances | |
|
|
|
| This data type represents any of the header fields defined in this
RFC. Each of the various instances contains with the return value
of the corresponding parser.
| | Constructors | | Instances | |
|
|
|
| A NameAddr is composed of an optional realname a mandatory
e-mail address.
| | Constructors | | Instances | |
|
|
| Produced by Haddock version 2.6.0 |