To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Linux/Unix Help

Linux/Unix Help Help with server-side Linux and Unix issues

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-05-2002, 01:29 PM   #1
michaelmwilson
Junior Member
 
Join Date: Sep 2002
Posts: 4
Sendmail

When using :

<?
$to="michaelmwilson1@aol.com";
$subject="hello";
$message="message body";


if (@mail($to,$subject,$message)){
echo "mail was sent";
}
else {
echo "mail was not sent";
}

?>

The script executes and says "mail was sent". When i check, i get no e-mail.
OS=freebsd 4.4
mailprog=sendmail.
I cannot figure out why, and cannot find any mail error messages or dead letters. Can anyone point me in the right direction to finding help?

Thanks in advance
Mike
michaelmwilson is offline   Reply With Quote
Old 09-05-2002, 01:42 PM   #2
bealers
Member
 
bealers's Avatar
 
Join Date: Aug 2002
Location: Worcestershire/UK
Posts: 37
on the command line try

echo "test body" | mail -s "test subject" foo@bar.com

do you get the email?
bealers is offline   Reply With Quote
Old 09-09-2002, 01:37 PM   #3
michaelmwilson
Junior Member
 
Join Date: Sep 2002
Posts: 4
yes i did get mail when using that code!
I have posted the server side error messages from /var/log/maillog associated with sending mail using php/web. Any help again is greatly appreciated!


sendmail[17015]: LAA17015: from=nobody, size=40, class=0, pri=40, nrcpts=0, msgid=<200209091509.LAA17015@michaelmwilson.com>, relay=nobody@localhost

sendmail[17015]: LAA17015: LAB17015: DSN: nobody... Recipient names must be specified

mail.local: setreuid(0, 0): Operation not permitted (r=65534, e=65534)

sendmail[17018]: LAB17015: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Service unavailable

sendmail[17018]: LAB17015: LAA17018: return to sender: Service unavailable

sendmail[17018]: Losing qfLAB17015: savemail panic

sendmail[17018]: LAB17015: SYSERR(nobody): savemail: cannot save rejected email anywhere: Permission denied

mail.local: setreuid(0, 0): Operation not permitted (r=65534, e=65534)

sendmail[17021]: LAA17018: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Service unavailable
michaelmwilson is offline   Reply With Quote
Old 09-10-2002, 09:24 PM   #4
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
If I read that correctly (which I may not have since I am half awake and have a pounding headache . . .), you tried to send the mail to multiple recipients, yes?
dotwebbie is offline   Reply With Quote
Old 09-11-2002, 10:56 AM   #5
michaelmwilson
Junior Member
 
Join Date: Sep 2002
Posts: 4
No, i'm only trying to send to one recipient. I'm examining some issues though. First: How does the $send_to variable have to be formatted? Is it "To: foo@bar.com" or just "foo@bar.com". Second: Why is the setreuid operation not allowed? I think if i can find the answers to these two questions, my problem is sovled.
Thanks again everyone
~~Mike
michaelmwilson is offline   Reply With Quote
Old 09-11-2002, 11:11 AM   #6
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
$send_to should not need the To:. Something that is just bugging me, perhaps it's just the setup of your system but why is the mail relaying off of
nobody@localhost? I'm not exactly familiar with *BSD so perhaps I'm barking up the wrong tree . . . Also, why is it complaining that no recipients were specified?
dotwebbie is offline   Reply With Quote
Old 09-13-2002, 05:45 AM   #7
KoshNaranek
Senior Member
 
KoshNaranek's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 117
i'm a little confused..

isn't a @ in front of a command "dont check execution/returncodes - don't prompt any errors" ?
__________________
The stroke of a brush does not guarantee art from the bristles
or in other words:
Do you like to sing? Learn how to!
KoshNaranek is offline   Reply With Quote
Old 09-13-2002, 11:23 AM   #8
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
The @ suppresses php errors and let's you use custom errors.
dotwebbie is offline   Reply With Quote
Old 09-13-2002, 11:44 AM   #9
Wave
weird creature
 
Join Date: Aug 2002
Posts: 92
afaik, simple solution of this problem described at php.net in user contributed notes for mail() function.
Wave is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:17 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.