Charles.Forsyth20061220965a0ca19 years agoHistory
56 lines · 1.2 KB · Text
RawDownload
.TH SMTP 2.SH NAMEsmtp \- Simple Mail Transfer Protocol.SH SYNOPSIS.EXinclude "smtp.m";smtp := load Smtp Smtp->PATH; open:     fn(server: string): (int, string);sendmail: fn(fromwhom: string,              towhom: list of string,              cc: list of string,             msg: list of string): (int, string);close:    fn(): (int, string);.EE.SH DESCRIPTION.B Smtpprovides an interface to the mail transport protocol SMTP..PP.B Openopens a connection to the given SMTP.IR server .If.I serveris nil,.B openuses thedefault mail server.BR $smtp ,which must be defined in.IR ndb (6).It returns -1 and an error message if the connection fails..PP.B Sendmailsends mail to the SMTP server for subsequent delivery.The first argument names the sender, the list.I towhomnames therecipients,.I ccis a list of CC's,and.I msghas the text of the message. The lattermay simply be a list of one item containing the whole message, a list of lines of the messageor any intermediate format. It returns -1 and an error message on failure..PP.B Closecloses the connection to the SMTP server..SH SOURCE.B /appl/lib/smtp.b.SH SEE ALSO.IR sendmail (1),.IR acme (1).SH BUGSToo much copying of strings is done, especially with large messages.