| MissingH-1.1.0.3: Large utility library | Source code | Contents | Index

Network.Email.Sendmail

Portability | portable
Stability | provisional
Maintainer | John Goerzen <jgoerzen@complete.org>

Description
This Haskell module provides an interface to transmitting a mail message. This is not compatible with Windows at this time. Written by John Goerzen, jgoerzen@complete.org
Synopsis

sendmail :: Maybe String -> [String] -> String -> IO ()

Documentation

sendmail | Source

:: Maybe String | The envelope from address. If not specified, takes the system's default, which is usually based on the effective userid of the current process. This is not necessarily what you want, so I recommend specifying it.
-> [String] | A list of recipients for your message. An empty list is an error.
-> String | The message itself.
-> IO () |

Transmits an e-mail message using the system's mail transport agent.

This function takes a message, a list of recipients, and an optional sender, and transmits it using the system's MTA, sendmail.

If `sendmail` is on the `PATH`, it will be used; otherwise, a list of system default locations will be searched.

A failure will be logged, since this function uses `safeSystem` internally.

This function will first try `sendmail`. If it does not exist, an error is logged under `System.Cmd.Utils.pOpen3` and various default `sendmail` locations are tried. If that still fails, an error is logged and an exception raised.

Produced by Haddock version 2.4.2