#48829 [Com]: mail connectivity problem
| From: | sjoerd-php at linuxonly dot nl | Date: | Tue, 07 Jul 2009 07:27:22 +0000 |
| Subject: | #48829 [Com]: mail connectivity problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139370@lists.php.net to get a copy of this message | ||
ID: 48829
Comment by: sjoerd-php at linuxonly dot nl
Reported By: lakshmi at nace dot co dot in
Status: Open
Bug Type: *Mail Related
Operating System: Windows and Linux
PHP Version: 5.2.10
New Comment:
Thank you for your report.
The issue you report is not a bug, rather a request for support. This
bug tracker is not the right place for support. Instead, try here:
IRC: irc.freenode.org ##php
Usenet: comp.lang.php, alt.comp.lang.php
Mailing lists: http://www.php.net/mailing-lists.php
WWW: http://stackoverflow.com/questions/tagged/php
Previous Comments:
------------------------------------------------------------------------
[2009-07-07 06:42:10] lakshmi at nace dot co dot in
Description:
------------
OS Windows XP home Edition, Redhat Linux 5
Server Apache 2.2.11
PHP 5.2.9-2
I get this:
Warning: mail(): Failed to connect to mailserver at "localhost" port
25,
verify your "SMTP" and "smtp_port" setting in php.ini or use
ini_set().
I tried by changing the php.ini and it does not work.
I hope you can help me
Request: This is the third time I am posting this query to PHP Bugs,
But
Still I haven't get any Proper Solutions.
Thanks a lot
Reproduce code:
---------------
<?php
$Name = "sam"; //senders name
$email = "am@example.com"; //senders e-mail adress
$recipient = "am1@example.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional
headerfields
if(mail($recipient, $subject, $mail_body, $header)) //mail command :)
echo "mail sent";
else
echo "mail not sent";
?>
Expected result:
----------------
It has to reach to the destination email id
Actual result:
--------------
Mail Sent
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48829&edit=1