
Quoth Jeremy Shaw
I wonder what it would take to make it so that the message body could be multipart mime...
Well, here's what it takes for me - - function to determine file type of attachment (e.g., image/jpeg) - data encoding (base64, maybe quoted-printable, others) - randomly generated separator string - a few standard header lines like "MIME-Version: 1.0" Not that I actually randomize the separator string, but I should, and I base64 encode everthing. My obscure platform provides the function to determine file type. Donn ------------
SMTPClient,
http://hackage.haskell.org/package/SMTPClient-1.0.3
can be used to send mail via SMTP to a smart host. It is still based on 'String', but it is a start. To send a simple message you can do:
import Network.SMTP.Simple import System.IO
main :: IO () main = do sendSimpleMessages (hPutStrLn stderr) "10.2.23.11" "example.com" [message] where message = SimpleMessage [NameAddr (Just "John Doe") "johnd@example.com"] [NameAddr (Just "Team") "team@exmaple.com"] "My test email using Network.SMTP.Simple" "Hi, this is a test email which uses SMTPClient."
I wonder what it would take to make it so that the message body could be multipart mime...