1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel quotations help.syntax help.markup
4 io.sockets strings calendar ;
8 { $description "Holds an " { $link inet } " object with the address of an SMTP server." } ;
10 HELP: smtp-read-timeout
11 { $description "Holds an " { $link duration } " object that specifies how long to wait for a response from the SMTP server." } ;
13 HELP: with-smtp-connection
14 { $values { "quot" quotation } }
15 { $description "Connects to an SMTP server stored in " { $link smtp-server } " and calls the quotation." } ;
18 { $values { "email" email } }
19 { $description "Creates an empty " { $link email } " object." } ;
22 { $values { "email" email } }
23 { $description "Sends an " { $link email } " object to an STMP server stored in the " { $link smtp-server } " variable. The required slots are " { $slot "from" } " and " { $slot "to" } "." }
25 { $unchecked-example "USING: accessors smtp ;"
27 " \"groucho@marx.bros\" >>from"
28 " { \"chico@marx.bros\" \"harpo@marx.bros\" } >>to"
29 " { \"gummo@marx.bros\" } >>cc"
30 " { \"zeppo@marx.bros\" } >>bcc"
31 " \"Pickup line\" >>subject"
32 " \"If I said you had a beautiful body, would you hold it against me?\" >>body"
38 ARTICLE: "smtp" "SMTP Client Library"
40 { $subsection send-email } ;