Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Younger Malaclypse

by Sinister (Friar)
on Mar 12, 2002 at 16:59 UTC ( #151158=note: print w/ replies, xml ) Need Help??


in reply to Sedmail or SMTP? (was: Younger Malaclypse)

For simple mailing do something like:

my $mailer = "/path/to/mailer"; open(MAIL, " | $mailer") || die ("Can't open PIPE to mailer: $mailer ( +$!)\n"); print MAIL <<'EOF'; To: you@yourdomain.com From: "The Camel" <your_perl_script@domain.com> Subject: This is your camel speaking! This is a mailbody, spoken by your camel, wearing a red-hat, being friends with penguin, called Tux EOF close(MAIL);

For maintainability you might want to decide to place the 'heredoc' (<<'EOF' ... EOF) outside of your code.

If you are about to do really great things with these emails, (such as adding attachments, etc.) you might want to read in to the use of the modules available on CPAN.

This code is untested, yet believed functional

er formait hyarya.
"Field experience is something you don't get until just after you need it."


Comment on Re: Younger Malaclypse
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-07-29 03:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls