Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Simple SendMail Question

by repson (Chaplain)
on Jan 23, 2001 at 04:18 UTC ( [id://53627]=note: print w/replies, xml ) Need Help??


in reply to Simple SendMail Question

Apart from what $code or die said, there are a couple of other things.
Can you see anything wrong with this:
$mail_prog = "/usr/sbin/sendmail -t"; open(MAIL, "|$mail_prog -t");
Apart from the fact these variables don't have their scope declared (see strict and my) you are passing sendmail two -t switches.

And the last thing, though it's no real problem, just a question of clarity and style is to use a heredoc instead of multiple prints.

print MAIL <<"MESG"; To: $recipient From: $sender Subject: database entry added --------------------------------------------------- . MESG

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found