- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Sending Email under PHP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 01:43 AM
тАО11-09-2003 01:43 AM
Sending Email under PHP
I am using PHP 4.2.2 on Linux 8.0.
I would like to send email by using PHP, but I fail to do it. My colleague confirms that all eequired PHP modules are loaded.
What configuration should I need to do for solving this problem?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 02:49 AM
тАО11-09-2003 02:49 AM
Re: Sending Email under PHP
What do your logs report ?
You should have something like this in your PHP code :
...
$recipient="foo@yahoo.com";
$title="trial";
$message="hello world";
mail($recipient,$title,$message);
echo "done);
?>
You can test it replacing last line by :
if (mail($recipient,$title,$message)))echo "ok, done";
else echo "problem on sending";
then post your log error messag for analysis.
hth
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 03:02 AM
тАО11-09-2003 03:02 AM
Re: Sending Email under PHP
Which log file should I post?
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 03:48 AM
тАО11-09-2003 03:48 AM
Re: Sending Email under PHP
depending on your machine, httpd.log if you set one up, or the part of /var/log/messages corresponding to the time of your sending trial.
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 03:54 AM
тАО11-09-2003 03:54 AM
Re: Sending Email under PHP
probably in
/var/log/http/paccess.log
or
/var/log/http/error.log
Jerome, will correct me if I am wrong !
J-P (Bonsoir, Jerome)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2003 04:39 AM
тАО11-09-2003 04:39 AM
Re: Sending Email under PHP
Exactly, especailly error file, but this of course if you set up logging on your httpd server.
If you don't see anything, then /var/log/messages will do.
J (not on weed end watching tv, JP ?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 04:38 AM
тАО11-10-2003 04:38 AM
Re: Sending Email under PHP
I attach "messages" file for error checking. Please help.
By the way, my colleague has a problem as below: (Please help him also.)
I have a virtal hosting server by named base method.
I found that I cannot use mail() function when using PHP4 even I set correctly in php.ini and sendmail to open smtp and set the sever has relay permission. But still fail to use mail() function. I found from other forums mention about some settings in "httpd.conf" regarding "php_admin_value". Also it mentions this function can be overrided by .htaccess and virtual host, what does it mean? And how can I solve the mail() problem of PHP
php-4.2.2-8.0.5
httpd-2.0.40-8
sendmail-8.12.5-7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 04:41 AM
тАО11-10-2003 04:41 AM
Re: Sending Email under PHP
Attached file is the error log.
Thanks again.