Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: How to send email

by httptech (Chaplain)
on Jul 06, 2000 at 01:07 UTC ( [id://21231]=note: print w/replies, xml ) Need Help??

in reply to How to send email

It looks like you are missing the leading quotation mark in your system call. Running perl -wc on your code will help you find small errors like this.

Update: I ran perl -wc on this code and it didn't spit out any errors, so it wouldn't have helped you in this case. It's still a good idea to use it though :)

I would try and shy away from writing the mail to a temp file though; it will be a headache for you if the directory or file permissions ever get changed. I would probably do something like:

open (MAIL, "|/usr/sbin/sendmail -t -oi -em") || die "Couldn't open sendmail: $!"; print MAIL <<EOM; To: me\ From: myscript\ Subject: Some subject $reportdata EOM close (MAIL);

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-05-27 06:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found