Thanks for the help Bill. This works partially, but the time isn't correct.
For example, Fri 12/5/2003 6:38 AM Would you know why the time is off? regards, John -----Original Message----- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 2:51 PM To: John Deretich Cc: Perl-Win32-Admin-Request (E-mail) Subject: Re: :SMTP John Deretich wrote: > Thanks Mark, > > but one question? > I tried $smtp->datasend("X-Sent: xxx\n"); > But it didn't put the additional line into > the header. Any idea why? This should do it - modify to suit : use strict; use Net::SMTP; my $mailhost = 'your-smtp-server-here'; my $me = 'your-email-addr-here'; my $to = $me; # for testing # connect to an SMTP server my $smtp = Net::SMTP->new($mailhost) or die "new SMTP: $! ($^E)"; $smtp->mail($me); # use the sender's address here $smtp->to($to); # recipient's address $smtp->data(); # Start the msg # Send the header. $smtp->datasend("Subject: Some subject\n"); # add subject line for looks $smtp->datasend("To: $to\n"); $smtp->datasend("From: $me\n"); my $time = localtime(time); $smtp->datasend("Date: $time\n"); $smtp->datasend("\n"); # Send the body. $smtp->datasend("Hello, World!\n"); $smtp->dataend(); # Finish sending the mail __END__ -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
