Re: [exim] Too many syntax or protocol errors

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tijl van der Steeg
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Too many syntax or protocol errors
Thanks but excuse my ignorance; can I just put this in mail.pm?

because I get: Software error:
Can't call method "mail" on an undefined value at NK/Mail.pm line 22.



> 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
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>