CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
almost got it, Net::SMTP ,, been a long day

 



nosredavid
New User

Aug 6, 2003, 8:02 PM

Post #1 of 2 (444 views)
almost got it, Net::SMTP ,, been a long day Can't Post

MadMadMadDAMN SPELLCHECKER DIED AND I HAD TO RETYPE THISMadMadMad

I've isolated the problem to the following lines of code. I am running win2kserv(named Starscream) and have tested good the SMTP service by sending mails to myself with another app.

use Net::SMTP;


$smtp = Net::SMTP->new('localhost');


$smtp->mail('Megatron@hotmail.com');


$smtp->to('THE_TERMINATOR');




If I run the script as is, I'll get a mail message in my SMTP's /drop folder with the top two lines saying { x-sender: megatron@hotmail.com } and { x-receiver: the_terminator@starscream } If I manually edit this and change to { x-receiver: myaddress@hotmail.com } then drop the file into my /pickup box, it instantly disappears and I also instantly get a message in my hotmail inbox.

If I go back to my script and change line four to { $smtp->to('myaddress@hotmail.com'); } the script runs and seems to execute without a hitch, but no mail message ever arrives to myaddress, which is one word, no spaces, or special chars. I've also tried farfetchedly changing line 1 to { $smtp = Net::SMTP->new('hotmail.com'); } but this just takes its time to execute and finally errors with message { can't call method "mail" on an undefined value at c:\perl\sandbox\mail\mailer.pl line 5 }

I'm sorely new at this and today has been a very very long day. if anyone has any ideas, please come forward.

Thanks for your time



p.s. I've also tried my companies mail address, thinking maybe hotmail had something in it doublechecking the accounts I was using to see if they were real(I tried using my account account to myself as well, nogo either).



nosredavid
New User

Aug 7, 2003, 6:57 AM

Post #2 of 2 (439 views)
Re: [nosredavid] almost got it, Net::SMTP ,, been a long day [In reply to] Can't Post

update..

I've changed line 4 to { $smtp->to('username\@hotmail.com') } and when I do that, I get a message in my SMTP Server /drop box with line { x-receiver: username\@hotmail.com@starscream }



just thought I'd try because in my research, I believe I read a different e-mail module using a \ in front of the @ for some reason.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives