in reply to NT and Email

Well that came out all messed up in formating..not sure why. To see a example of the code look at this link: http://www.perlmonks.com/index.pl?node_id=23303&lastnode_id=23299 I am also going to contact jcwren about this and see what he has to say. Thanks again, Thomas

Replies are listed 'Best First'.
RE: Re: NT and Email
by Adam (Vicar) on Sep 24, 2000 at 04:43 UTC
    Your posting problem is that you failed to put <code> tags around your </code>.

    use strict; use Net::SMTP; my $globalMailServer = "127.0.0.1"; { sendmail ('JoeCool@somewhere.com', # put real e-mail address here 'JoeCoolio', # put your real name here 'shipping@somewhere.com', # put dest e-mail address here 'Shipping Department', # put dest name here 'You the man', # subject 'This probably wont work, but oh well.'); # message } sub sendmail { @_ == 6 or die "Improper number of arguments"; my ($fromemail, $fromname, $toemail, $toname, $subject, $message) += @_; my $smtp = 0; $smtp = Net::SMTP->new($globalMailServer) or die "Can't connect to + mail server named '$globalMailServer'\n"; $smtp->mail ($fromemail); $smtp->to ($toemail); $smtp->data (); $smtp->datasend ("To: $toname\n"); $smtp->datasend ("From: $fromname\n"); $smtp->datasend ("Subject: $subject\n"); $smtp->datasend ("\n"); $smtp->datasend ($message); $smtp->dataend (); $smtp->quit; }