Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Sendmail problem

by doc_faustroll (Scribe)
on Mar 22, 2008 at 16:21 UTC ( #675648=note: print w/ replies, xml ) Need Help??


in reply to Sendmail problem

The below works just fine:
#assuming email_address was declared and currently has no escapes #print "from is $from_string\n"; $email_address =~ s/@/\@/; $from_string =~ s/@/\@/; open( SENDMAIL, "|/usr/lib/sendmail -oi -t" ) or die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"EOF"; From: $from_string To: $email_address Subject: $subject Content-type: text/html $$textref EOF close(SENDMAIL) or warn "sendmail didn't close nicely"; print qq ( email sent to $email_address\n);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2016-06-27 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.