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 "The name of the machine that is sending the email. This variable will be filled in by the " { $link host-name } " word if not set by the user." } ;
11 { $description "Holds an " { $link inet } " object with the address of an SMTP server." } ;
13 HELP: smtp-read-timeout
14 { $description "Holds an " { $link duration } " object that specifies how long to wait for a response from the SMTP server." } ;
17 { $description "Set true by default, determines whether the SMTP client is using the Extended SMTP protocol." } ;
19 HELP: with-smtp-connection
20 { $values { "quot" quotation } }
21 { $description "Connects to an SMTP server stored in " { $link smtp-server } " and calls the quotation." } ;
24 { $values { "email" email } }
25 { $description "Creates an empty " { $link email } " object." } ;
28 { $values { "email" email } }
29 { $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" } "." }
31 { $unchecked-example "USING: accessors smtp ;"
33 " \"groucho@marx.bros\" >>from"
34 " { \"chico@marx.bros\" \"harpo@marx.bros\" } >>to"
35 " { \"gummo@marx.bros\" } >>cc"
36 " { \"zeppo@marx.bros\" } >>bcc"
37 " \"Pickup line\" >>subject"
38 " \"If I said you had a beautiful body, would you hold it against me?\" >>body"
44 ARTICLE: "smtp" "SMTP Client Library"
46 { $subsection smtp-server }
47 { $subsection smtp-read-timeout }
48 { $subsection smtp-domain }
49 { $subsection esmtp? }
51 { $subsection send-email } ;