Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Using Email::Send::SMTP with authentication

Reply
Thread Tools

Using Email::Send::SMTP with authentication

 
 
Bob
Guest
Posts: n/a
 
      04-18-2006
Hello, all...

I am trying to send email messages via a remote SMTP server using the
Email::Send::SMTP module. It's _almost_ (I think) working, but I can't
get past the authentication. The error message is "Couldn't
authenticate 'myaccount:...' at emailtest.pl line 27" (the line with
the call to send()). Probably a dumb mistake on my part. Can anyone
offer guidance? My test code is below.

Thanks!

Bob

#!/usr/bin/perl

use strict;

use Email::Send;
use Email::Send::SMTP;

my $msg = Email::Send->new({mailer => 'SMTP'});
$msg->mailer_args([
header => [
To => '',
Subject => 'email test',
From => ''],
attributes => {'content_type' => 'text/html'},
body => 'This is a test']);

my $retval = Email::Send::SMTP->send(
$msg,
Host => 'smtp.mydomain.com',
username => 'myaccount',
password => 'mypassword');

die "$retval" if ! $retval;

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practices for using forms authentication and security in a hosted env (was: Re: Using a Forms authentication in a shared hosting environment) JEFF ASP .Net 1 11-12-2007 07:00 PM
Failed Authentication, Status "Unsupported Authentication Algorithm" Rafael Cisco 1 11-26-2004 03:57 PM
SQL integrated authentication when using forms authentication Brett Smith ASP .Net 2 10-26-2004 02:15 PM
Moving from Baisc Authentication to Forms Authentication raj mandadi ASP .Net 0 12-22-2003 12:16 AM
Forms Authentication, external authentication server, & rerouting to orig. req. URL Andrew Connell ASP .Net 1 10-21-2003 05:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57