Mercurial > email
diff mail.urs @ 0:33bf7ee17644
Initial import from some old code
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 03 Mar 2012 14:59:04 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mail.urs Sat Mar 03 14:59:04 2012 -0500 @@ -0,0 +1,22 @@ +(** Ur/Web e-mail sending library *) + +(* To assemble a message, produce a value in this type standing for header values. *) +type headers + +val empty : headers + +(* Each of the following may be used at most once in constructing a [headers]. *) +val from : string -> headers -> headers +val subject : string -> headers -> headers + +(* The following must be called with single valid e-mail address arguments, and + * all such addresses passed are combined into single header values. *) +val to : string -> headers -> headers +val cc : string -> headers -> headers +val bcc : string -> headers -> headers + +(* Send out a message by connecting to an SMTP server on localhost:25. *) +val send : headers + -> string (* Plain text message body *) + -> option xbody (* Optional HTML message body *) + -> transaction unit