Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Answer: How do you properly use sendmail?

( #280898=categorized answer: print w/ replies, xml ) Need Help??

Q&A > mail and news > How do you properly use sendmail? contributed by Juerd

my $mailer = '/usr/sbin/sendmail -t -oi'; my $recipient = 'foo@bar.com'; my $message = '...'; open my $mailer, "|$mailer" or die $!; print $mailer <<"END" or die $!; From: user\@domain.com To: $recipient Subject: Testing 123 $message END close $mailer or die $!;
Remember to make sure all data that goes into the headers (just $recipient in this example) is valid.

Comment on Answer: How do you properly use sendmail?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (17)
As of 2015-07-01 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (3 votes), past polls