Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Help on emailing results

by thatguy (Parson)
on Dec 18, 2003 at 19:25 UTC ( #315624=note: print w/replies, xml ) Need Help??


in reply to Help on emailing results

If you're running your script from a Unix box and you have Sendmail installed, you can always add this to your print:
my $mailprogram = '/usr/sbin/sendmail'; # or path to your sendmail open (MAIL,"|$mailprogram -t"); print MAIL "To: toaddress\@example.com\n"; print MAIL "From:fromaddress\@example.com\n\n"; print MAIL $yourdata; #### Existing code that prints to the screen ### print "$yourdata\n"; #### End of print to screen ### close(MAIL);
Hopefully this helps. I can't say it will or will not work for sure with your program since I haven't seen it.

-phill
Updated with missing \n that ysth spoted for 10 points.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://315624]
help
Chatterbox?
[Tanktalus]: I think I'm "out there" somewhere. I sure don't feel like I'm "here" right now. :S
Discipulus psylocibina party?
[Discipulus]: listen monks: do you think is possible to realize here at pm some kind of collaborative works? beyond ask & answer, i mean

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-09-22 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (269 votes). Check out past polls.

    Notices?