Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Sendmail to non-working email address

by hardburn (Abbot)
on Sep 04, 2003 at 16:47 UTC ( [id://288917]=note: print w/replies, xml ) Need Help??


in reply to Sendmail to non-working email address

Wrap your sendmail portions in an eval block:

eval { open (SENDMAIL, '|/usr/sbin/sendmail -oi -t'); print SENDMAIL <<"EOF"; From:<$MAIL{'FROM'}> To:<$MAIL{'TO'}> Subject: $MAIL{'SUBJECT'} $MAIL{'BODY'} EOF close (SENDMAIL); }; if($@) { print "Something went wrong!\n"; }

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://288917]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found