Hi,
The last 3 days I've been reading up on how to setup a SMPT server on my Windows IIS and trying to use Perl to send mail using that smpt server. I realized that I didn't have too, and I spent the last 3 days researching for nothing.
Now I'm back here again trying to send mail using Perl on Windows. This is a daunting task, because I never got this to work. I got sendmail working on a Linux box , but not a Windows one.
Heres my scenario, I'm using Mail::Sendmail and found out that my smpt server is the one that my nameserver is hosted on. The provider is comcast, so the relay server is smpt.comcast.com. I was told that when using this, it'll recognize my machine and allow me to use it as a relay.
So my code is the following (which still doesn't send mail):
use Mail::Sendmail;
# Set up some default configuration
unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , 'smtp.comcast.com';
$Mail::Sendmail::mailcfg{'from'} = "test\@aol.com";
my %mail = (
To => "mytestaddress\@aol.com", #real add changed for this ex.
Subject => "Test 1",
Message => "Test number 1",
);
sendmail( %mail ) or print "Error: $Mail::Sendmail::error\n";
print "Sent Successfully";
Now the above code, does not generate a Mail::Sendmail::error, and prints out "Sent Successfully", but I do not receive anything. Does anyone know if this would be a Perl problem I'm having or some setup I'm not doing correctly? Anyone dealt with using comcast relay server ? ahhh...I'm going nuts the last 3 days trying to get my perl script to send mail on windows.
Thanks for your time in reading all of this...
Brendan
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.