Hi Sean,
I think there is a firewall, but I don't have access to it because I am on
work.
I solved my problem using the sendmail with the code below in my script:

open (MAIL, "|/usr/sbin/sendmail -t ");
print MAIL "From: someaddr...@somedomain\n";
print MAIL "To: someaddre...@somedomain\n";
print MAIL "Content-Type: text/plain\n";
print MAIL "Subject: Very simple email test\n\n";
print MAIL "Body of the message";
close (MAIL);

Thanks for your help

Fúlvio

On Tue, Jan 6, 2009 at 10:47 AM, Sean Davis <sdav...@mail.nih.gov> wrote:

>
>
> On Tue, Jan 6, 2009 at 7:17 AM, Fúlvio <fulvi...@gmail.com> wrote:
>
>> Hi Jody,
>>
>> I use your code bellow but the the following error message happens:
>>
>> "Can't call method "domain" on an undefined value at ...."
>
>
> Works for me.  Are you behind a firewall by any chance?
>
> Sean
>
>
>>
>>
>> On 5 jan, 21:16, jody_rrhq_fa...@yahoo.com (Jody Fanto) wrote:
>> > The problem is that you are using an invalid smtp server address.  You
>> probably want "smtp.mail.yahoo.com".  For example, this works for me --
>> >
>> > #!perl
>>
>> > use strict;
>> > use warnings;
>> >
>> > use Net::SMTP;
>> >
>> > my $smtp = Net::SMTP->new("smtp.mail.yahoo.com", Timeout => 5);
>> > print "Domain is: " . $smtp->domain() . "\n";
>> >
>> > --Jody
>> >
>> > ----- Original Message ----
>> > > To: beginners-...@perl.org
>> >
>> > > Hi all,
>> >
>> > > I am trying to send an email using the following code:
>> >
>> > > use Net::SMTP;
>> >
>> > > $smtp = Net::SMTP->new("smtp.yahoo.com");
>> > > $smtp->mail('fulviocg');
>> >
>> > > but the error below is happening:
>> >
>> > > Can't call method "mail" on an undefined value at ....
>> >
>> > > Can someone help me?
>> >
>> > > Thanks
>> >
>> > > Fúlvio
>>
>>
>> --
>> To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
>> For additional commands, e-mail: beginners-cgi-h...@perl.org
>> http://learn.perl.org/
>>
>>
>>
>

Reply via email to