Tags:
create new tag
, view all tags

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

WhatDoesItAffect: API, Documentation, Vars

Implementation

-- Contributors: AsphaltJesus - 16 Jan 2008

Discussion

 
Topic revision: r2 - 2008-01-17 - KwangErnLiew
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.