Tijl van der Steeg wrote:
> I'm getting
>
> 2007-10-19 13:04:46 SMTP call from (localhost.localdomain) [127.0.0.1]
> dropped: too many syntax or protocol errors (last command was "")
>
> When running this script:
>
> use strict;
> use Net::SMTP;
>
> my $mailserver = "127.0.0.1";
> my $mailfromname = "Training Diary";
> my $mailfrom = "127.0.0.1";
> sub mail {
> my($mailto, $subject, $text) = @_;
>
> my $smtp = Net::SMTP->new($mailserver);
You may enable debugging output by calling
Net::SMTP->new($mailserver, { Debug => 1 });
And what about error checking?
$smtp->mail($mailfrom) or die $smtp->message();
$smtp->to($mailto) or die $smtp->message();
Roland