Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2016-12-09 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (152 votes). Check out past polls.