in reply to Net::SMTP_auth
I tried it with the following code (look behind the output), but I keep getting following output:
And here is the code I use:C:\Documents and Settings\Isabelle\Bureaublad\bernard>perl mailstuurde +r.pl Net::SMTP_auth>>> Net::SMTP_auth(0.07) Net::SMTP_auth>>> Net::SMTP(2.29) Net::SMTP_auth>>> Net::Cmd(2.26) Net::SMTP_auth>>> Exporter(5.58) Net::SMTP_auth>>> IO::Socket::INET(1.27) Net::SMTP_auth>>> IO::Socket(1.28) Net::SMTP_auth>>> IO::Handle(1.24) Net::SMTP_auth: Unexpected EOF on command channel at mailstuurder.pl l +ine 8 Can't call method "auth" on an undefined value at mailstuurder.pl line + 9.
Anybody knows how I can fix this error? I've tried all from Mail::Mailer to Mail::Sendmail (and some other things), but this seems to be best suited to solve my problems, so getting this to work would be quite nice.#!/usr/bin/perl use warnings; use strict; use Net::SMTP_auth; use Net::SMTP; my $smtp = Net::SMTP_auth->new('smtp.gmail.com', Debug => 1); $smtp->auth('LOGIN', 'b.siebens@gmail.com', '********'); $smtp->mail('watcher@landbouwkring.be'); $smtp->to('b.siebens@gmail.com'); $smtp->data(); $smtp->datasend("To: b.siebens\@gmail.com"); $smtp->datasend("From: watcher\@landbouwkring.be"); $smtp->datasend("\n"); $smtp->datasend("A simple test message.\n"); $smtp->dataend(); $smtp->quit();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Net::SMTP_auth
by Anonymous Monk on Oct 21, 2010 at 06:28 UTC |
In Section
Code Catacombs