Mail::Sender and STARTTLS

J

JGH

I'm trying to send an email messave via a server that requires
authentication. I'm using the Mail::Sender module. The error message I'm
getting looks like this (this is acutally the output from the script
below):

Valid protocols: PLAIN,LOGIN
Error: Authentication protocol LOGIN is not accepted by the server,
response: 530 5.7.0 No STARTTLS command has been given.


#!/usr/bin/perl
use Mail::Sender;
my $sender = new Mail::Sender ( {
smtp => 'smtpauth.wiscmail.wisc.edu', from => '(e-mail address removed)',
auth => 'LOGIN', authid => 'jheim', authpwd =>
'bogus'});

print ("Valid protocols: " . join (',', $sender->QueryAuthProtocols()) .
"\n");

my $stat = $sender->MailMsg ({
to => '(e-mail address removed)',
subject => '33 Here is the file',
msg => "I'm sending you the list you wanted."
});
die "Error: $Mail::Sender::Error\n" unless ref $stat;
 
I

Ilmari Karonen

I'm trying to send an email messave via a server that requires
authentication. I'm using the Mail::Sender module. The error message I'm
getting looks like this (this is acutally the output from the script
below):

Valid protocols: PLAIN,LOGIN
Error: Authentication protocol LOGIN is not accepted by the server,
response: 530 5.7.0 No STARTTLS command has been given.

From what I can tell, Mail::Sender simply doesn't support TLS.

With a bit of googling for "perl SMTP STARTTLS", I found:

http://www.logix.cz/michal/devel/smtp/smtp-client.pl

Even if that script itself doesn't do what you want, it seems to me
that it wouldn't be too hard to patch Mail::Sender to use TLS based on
the code found in that script. The actual STARTTLS code appears to be
about two dozen lines in total.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top