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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

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


New User

Aug 6, 2003, 8:02 PM

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


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');



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: } and { x-receiver: the_terminator@starscream } If I manually edit this and change to { x-receiver: } 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(''); } 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(''); } 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\ 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).

New User

Aug 7, 2003, 6:57 AM

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


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

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