Hey Stewart,

There are many ways to do this. I usually use Net::SMTP, but there is
also Net::Mailer (which I believe runs Net::SMTP for you), and
Net::Sendmail (and I think this runs Net::Mailer?).

I think you are missing the "datasend" To: & From: in your smtptest.pl

Here is the Net::SMTP template I usually use.
====================================================
sendMail();

sub sendMail {
    use Net::SMTP; # Move to top w/ other use
    my $MailTo = "user\@mailhost.com";
    my $Subject = "Subject:text here";
    my $MessageBody = "The message";

    my $smtp = Net::SMTP->new("smtp.server.com");
    $smtp->mail($MailTo); # envelope bits
    $smtp->to($MailTo); # envelope bits
    $smtp->data(); # Now for the message itself
    $smtp->datasend("From: $MailTo\n");
    $smtp->datasend("To: $MailTo\n");
    $smtp->datasend("$Subject\n\n");
    $smtp->datasend("$MessageBody");
    $smtp->dataend(); # end the message
    $smtp->quit;
}
====================================================
Monday, July 09, 2001, 8:54:12 AM, my MUA believes you used
(X-Mailer not set) to write:

8<---------snip

SW> Looking at these I guess there is either something I must to to find out
SW> the real name of any alias on that server, or maybe I need to add some more
SW> headers?  Can anyone give any suggestions about the extra things netscape
SW> does when sending an email?

8<-------------snip

SW> PS. I've attached a copy of my basic source code (used for testing at the
SW> moment).

SW> (See attached file: smtptest.pl)

I think the list prefers sample code in the message, not as an
attachment.

-- 
[EMAIL PROTECTED]
Using The Bat! (http://www.ritlabs.com/the_bat/) eMail v1.53d
Windows NT 5.0.2195 (Service Pack 1)
MS-DOS: celebrating ten years of obsolescence 


NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net

Reply via email to