head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 2007.01.16.04.11.59; author TWikiContributor; state Exp; branches; next 1.1; 1.1 date 2006.02.01.12.01.25; author TWikiContributor; state Exp; branches; next ; desc @new-topic @ 1.2 log @buildrelease @ text @---+ Package =TWiki::Net= Object that brokers access to network resources. %TOC% ---++ ObjectMethod *getUrl* ($protocol,$host,$port,$url,$user,$pass) -> $text Get the text at the other end of a URL ---++ setMailHandler( \&fn ) * =\&fn= - reference to a function($) (see _sendEmailBySendmail for proto) Install a handler function to take over mail sending from the default SMTP or sendmail methods. This is provided mainly for tests that need to be told when a mail is sent, without actually sending it. It may also be useful in the event that someone needs to plug in an alternative mail handling method. ---++ ObjectMethod *sendEmail* ($text,$retries) -> $error * =$text= - text of the mail, including MIME headers * =$retries= - number of times to retry the send (default 1) Send an email specified as MIME format content. Date: ...\nFrom: ...\nTo: ...\nCC: ...\nSubject: ...\n\nMailBody... @ 1.1 log @buildrelease @ text @d8 1 a8 1 ---++ ObjectMethod *getUrl* ($host,$port,$url,$user,$pass,$header) -> $text d15 1 d25 1 @