Feature Proposal: Fix SMTP Auth
Motivation
Net::SMTP auth does not work as documented. Below is a hack to get you started fixing it. You must include MIME::Base64
Description and Documentation
Examples
$smtp->datasend("AUTH LOGIN\n")|| die $mess.$smtp->message;
$smtp->response()|| die $mess.$smtp->message;
my $emaillogin = ($TWiki::cfg{SMTP}{Username});
$smtp->datasend(encode_base64($emaillogin))|| die $mess.$smtp->message.$emaillogin;
$smtp->response() || die $mess.$smtp->message;
my $passwd = ($TWiki::cfg{SMTP}{Password});
$smtp->datasend(encode_base64($passwd))|| die $mess.$smtp->message.$passwd;
# $smtp->response()|| die $mess.$smtp->message;
}
$smtp->response();
#set email from @to has two elements, the first being the fully qualified email address
$smtp->mail('THE SAME NAME YOU ARE USING TO LOGIN@Yourdomain.com'); # Don't \@ anywhere, it doesn't work as expected.
my $toemail = @to[0];
$smtp->to($toemail) || die $mess.$smtp->message;
$smtp->data();
$smtp->datasend("From: Use<YOURLOGIN"."@"."Yourdomain.com>\n"); #the @ symbol gets treated wrong if I try to do it another way
$smtp->datasend("To: ".$toemail."\n");
$smtp->datasend("Content-Type: text/html \n");
$smtp->datasend("Subject: Wiki from your domain");
$smtp->datasend("\n");
$smtp->datasend( $text ) || die $mess.$smtp->message;
$smtp->datasend("\n");
Impact
Implementation
--
Contributors: AsphaltJesus - 16 Jan 2008
Discussion