comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:33bf7ee17644
1 (** Ur/Web e-mail sending library *)
2
3 (* To assemble a message, produce a value in this type standing for header values. *)
4 type headers
5
6 val empty : headers
7
8 (* Each of the following may be used at most once in constructing a [headers]. *)
9 val from : string -> headers -> headers
10 val subject : string -> headers -> headers
11
12 (* The following must be called with single valid e-mail address arguments, and
13 * all such addresses passed are combined into single header values. *)
14 val to : string -> headers -> headers
15 val cc : string -> headers -> headers
16 val bcc : string -> headers -> headers
17
18 (* Send out a message by connecting to an SMTP server on localhost:25. *)
19 val send : headers
20 -> string (* Plain text message body *)
21 -> option xbody (* Optional HTML message body *)
22 -> transaction unit