•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,488 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,412 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3575 | Replies: 5 | Solved
![]() |
•
•
Join Date: Aug 2006
Posts: 999
Reputation:
Rep Power: 4
Solved Threads: 1
I am attempting to track and record information in a specific php file used where I work. The file is not my own work originally; I inherited it from my predecessor in the position. I am somewhat familiar with PHP, but not an expert. Additionally, I am still a newcomer to Linux work, and the file in question is running on the Suse 9 distribution.
I have modified the file with a simple check at the end to mark certain predefined limits for my tracking purposes. When the file's output goes past these limits, the file is supposed to email me, letting me know what has happened.
I know about the mail() function; I found out about it shortly after I began working on this program. The problem is, it doesn't seem to want to work for me. I am not sure that this is a php problem; the php mail() call always returns a true for me when I test it. However, I have tested microvariations on the mail call (mostly differing echo statements so I'll know it has processed correctly), but have not yet received any of the messages I have been attempting to send myself. Considering I've sent about three dozen by now, over the course of a ~3hr span, I suspect something is happening to prevent them from reaching the internet and being sent.
Does anyone know of any reason that the information sent by the mail function might not be going anywhere?
I recognize, since I am constantly getting 'true' results, that this might not be a php problem. If it is not; if this sounds like it might be a problem with the OS instead, I respectfully request that this message be moved to the correct forum.
Thanks in advance,
-EnderX
I have modified the file with a simple check at the end to mark certain predefined limits for my tracking purposes. When the file's output goes past these limits, the file is supposed to email me, letting me know what has happened.
I know about the mail() function; I found out about it shortly after I began working on this program. The problem is, it doesn't seem to want to work for me. I am not sure that this is a php problem; the php mail() call always returns a true for me when I test it. However, I have tested microvariations on the mail call (mostly differing echo statements so I'll know it has processed correctly), but have not yet received any of the messages I have been attempting to send myself. Considering I've sent about three dozen by now, over the course of a ~3hr span, I suspect something is happening to prevent them from reaching the internet and being sent.
Does anyone know of any reason that the information sent by the mail function might not be going anywhere?
I recognize, since I am constantly getting 'true' results, that this might not be a php problem. If it is not; if this sounds like it might be a problem with the OS instead, I respectfully request that this message be moved to the correct forum.
Thanks in advance,
-EnderX
I had the same problem once, I could never get the mail() function to work. Turn out after a few hours I thought about checking my spam filter, and seeing all the emails that had actually worked but were caught at my ISP. A definite DUH for me, I now always check it.
And if thats not your case, and the server is local to you, try and send the mail to yourself@localhost and see if maybe network problems are causing it not to send or filters stopping it. You can also check the php.ini file for sendmail settings. Maybe they are wrong
StatiX
And if thats not your case, and the server is local to you, try and send the mail to yourself@localhost and see if maybe network problems are causing it not to send or filters stopping it. You can also check the php.ini file for sendmail settings. Maybe they are wrong
StatiX
I don't have a unix box handy, just windows but this is what you would need to look at:
*****************************************
This is an excert from a win32 php.in file
What you will need to check is the path to sendmail, make sure it is correct. Some Servers use other software besides sendmail to send mail, if so you need the correct path to the mail program. Usually a program will act as though it is sendmail and you need not worry with it.
Note that this file is from a win 32 machine and will not work on unix
StatiX
*****************************************
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = "C:\Program Files\xampp\sendmail\sendmail.exe -t" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters =
This is an excert from a win32 php.in file
What you will need to check is the path to sendmail, make sure it is correct. Some Servers use other software besides sendmail to send mail, if so you need the correct path to the mail program. Usually a program will act as though it is sendmail and you need not worry with it.
Note that this file is from a win 32 machine and will not work on unix
StatiX
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- PHP Mail Error (PHP)
- Sending HTML email via PHP mail function (PHP)
- PHP Mail with Sender ID (PHP)
- how do you setup php mail()? using sendmail and yellowdog linux w/apache and php4 (*nix Software)
- Stuck on Mail() Function (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP Members HELP W/DB Images
- Next Thread: populate a select box using PHP


Linear Mode