cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail

magsandco
Newbie
Posts: 2
Registered: ‎25-07-2007

sendmail

I am trying to locate the sendmail program and am using /usr/sbin/sendmail but it doesn't work.  I keep getting error messages. Any ideas? 
5 REPLIES 5
paulh
Community Veteran
Posts: 1,280
Thanks: 10
Registered: ‎30-07-2007

Re: sendmail

"It doesn't work" and "I keep getting error messages" aren't terribly descriptive.
Perhaps if you could give some context,such as the OS version you are using (presumably Linux of some sort), what it is that isn't working, and the error messages you are encountering, I expect one of the gurus round here will be able to help

magsandco
Newbie
Posts: 2
Registered: ‎25-07-2007

Re: sendmail

The problem is that I cannot locate the sendmail program.  Error message 500 appears when I run the script from my webpage.  I can send the contents of the form to a text file but cannot email the contents to my self. my program for emailing  starts:  open ( MAIL,"|/usr/sbin/sendmail -t"); 
Quote from: paulh
"It doesn't work" and "I keep getting error messages" aren't terribly descriptive.
Perhaps if you could give some context,such as the OS version you are using (presumably Linux of some sort), what it is that isn't working, and the error messages you are encountering, I expect one of the gurus round here will be able to help

jelv
Community Veteran
Posts: 26,786
Thanks: 990
Fixes: 10
Registered: ‎10-04-2007

Re: sendmail

Are you by any chance talking about ccgi?
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: sendmail

what "program" are you refering to: perl, php, shellscript Huh
on the ccgi server, sendmail is where you have stated but i'm not sure about you using open() which is to open files, not send text to sendmail.
Colin
Community Veteran
Posts: 1,264
Registered: ‎04-04-2007

Re: sendmail

If you're using perl, you can use open to contact the sendmail binary.
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
print SENDMAIL $reply_to;
print SENDMAIL $subject;
print SENDMAIL $send_to;
print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL $content;
close(SENDMAIL);