Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-30-2009, 04:32 PM   #1
Registered: Sep 2005
Posts: 30

Rep: Reputation: 15
perl SMTP SSL not working on 32 bit Debian


I have a Perl mail program that works perfectly on Ubuntu 64 bit, but on a Debian 32 bit system Gmail never authenticates successfully. Anyone else aware of this and is there any fix for it?

Old 06-30-2009, 04:46 PM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Help us help you, don't make us pull teeth. What is the error message and what exactly are you doing to get it?

How to ask smart questions
Old 06-30-2009, 06:14 PM   #3
Registered: Sep 2005
Posts: 30

Original Poster
Rep: Reputation: 15
Originally Posted by AlucardZero View Post
Help us help you, don't make us pull teeth. What is the error message and what exactly are you doing to get it?

How to ask smart questions
I will use examples to be more clear, so this is the code I'm using

#!/usr/bin/perl -w

use Net::SMTP::SSL;

sub send_mail {
my $to = $_[0];
my $subject = $_[1];
my $body = $_[2];

my $from = '';
my $password = 'mygmailpass';

my $smtp;

if (not $smtp = Net::SMTP::SSL->new('',
                            Port => 465,
                            Debug => 1)) {
   die "Could not connect to server\n";

$smtp->auth($from, $password)
   || die "Authentication failed!\n";

$smtp->mail($from . "\n");
my @recepients = split(/,/, $to);
foreach my $recp (@recepients) {
    $smtp->to($recp . "\n");
$smtp->datasend("From: " . $from . "\n");
$smtp->datasend("To: " . $to . "\n");
$smtp->datasend("Subject: " . $subject . "\n");
$smtp->datasend($body . "\n");

# Send away!
&send_mail('', 'Subject', 'Some more detail');
so the code works perfectly on my Ubuntu 64 bit but on Debian 32 bit authentication fails, here is the output when I run the program on Debian 32 bit

Net::SMTP::SSL>>> Net::SMTP::SSL(1.01)
Net::SMTP::SSL>>> IO::Socket::SSL(1.16)
Net::SMTP::SSL>>> IO::Socket::INET(1.31)
Net::SMTP::SSL>>> IO::Socket(1.30_01)
Net::SMTP::SSL>>> IO::Handle(1.27)
Net::SMTP::SSL>>> Exporter(5.62)
Net::SMTP::SSL>>> Net::Cmd(2.29)
Net::SMTP::SSL=GLOB(0x8949570)<<< 220 ESMTP g31sm2118703rvb.1
Net::SMTP::SSL=GLOB(0x8949570)>>> EHLO localhost.localdomain
Net::SMTP::SSL=GLOB(0x8949570)<<< at your service, []
Net::SMTP::SSL=GLOB(0x8949570)<<< 250-SIZE 35651584
Net::SMTP::SSL=GLOB(0x8949570)<<< 250-8BITMIME
Net::SMTP::SSL=GLOB(0x8949570)<<< 250-AUTH LOGIN PLAIN
Net::SMTP::SSL=GLOB(0x8949570)<<< 250 PIPELINING
Authentication failed!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP Server with SSL auth Penn Linux - Server 1 04-06-2009 03:51 AM
opensuse 10.3 and sending smtp via SSL/TLS newbuyer17 Linux - Server 1 02-27-2008 02:26 AM
apache2 on debian etch: SSL not working t0bias Linux - Server 1 06-01-2007 06:46 AM
qmail ssl and smtp not working together shmude Linux - Software 0 11-02-2005 07:02 PM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration