Edit report at http://bugs.php.net/bug.php?id=15373&edit=1

 ID:               15373
 Updated by:       mfisc...@php.net
 Reported by:      alonso at admintek dot net
 Summary:          mail() not working, no error with invalid SMTP or
                   email address
 Status:           Bogus
 Type:             Bug
 Package:          Mail related
 Operating System: win2000
 PHP Version:      4.2.1
-Assigned To:      mfischer
+Assigned To:      

 New Comment:

De-assigning


Previous Comments:
------------------------------------------------------------------------
[2010-06-23 08:46:59] vengat dot zen at gmail dot com

hi 



check your send mail path (uncomment)

for ini settings.......(after change restart your sever)

------------------------------------------------------------------------
[2009-09-09 12:15:16] paj...@php.net

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.



------------------------------------------------------------------------
[2009-09-09 12:13:19] ilmi_bunjaku at yahoo dot com

I have e problem, I can not sent email with PHP

the server is wampserver, OS windows xp 

I have one error as you can see:



Warning: mail() [function.mail]: Failed to connect to mailserver at 

"localhost" port 25, verify your "SMTP" and "smtp_port" setting in 

php.ini or use ini_set() in D:\Webroot\PHP\dergo email.php on line 16





the cod which I write is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml";>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-

1" />

<title>Dergo email</title>



</head>



<body>

<?php

$to = "em...@yahoo.com";

$subject = "Test mail";

$message = "hello! .";

$from = "em...@hotmail.com";

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail sent.";

?>

</body>

</html>



best regards,

ILA

------------------------------------------------------------------------
[2009-08-25 01:13:40] dallas_thompson2001 at yahoo dot com

i am having a problem like this and am so lost, i cant send mail from 

the server but it wont let mail be sent from the website and they tell 

me it is a problem with the PHP can some look and tell me what i have 

dont wrong and how to make it work.



<?php





//--------------------------------------------------------------------

User Area



$ToEmail = "mail.thirdstreetdesignstudio.com";

$ToName = "Dallas Thompson";

$ToSubject = "Thanks for your email. One of our consultants will 

respond to your request shortly. ";



//--------------------------------------------------------------------











//--------------------------------------------------------------------

Prohibited Area No Changes 

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From: '.$_POST['_namex'].' <'.$_POST['_emailx'].'>' . 

"\r\n";



$Message = "Sender Name:".$_POST['_namex']."<br/><br/>Sender 

Email:".$_POST['_emailx']."<br/><br/>Sender 

Phone:".$_POST['_phonex']."<br/><br/>Message:".$_POST['_commx'];



if($_REQUEST['_emailx']!=""){

        mail($ToName." <".$ToEmail.">",$ToSubject, $Message, 

$headers);

}





echo "_root.Status=success";





?>

------------------------------------------------------------------------
[2009-07-07 06:28:32] lakshmi at nace dot co dot in

OS       Windows XP home Edition, Redhat Linux 5

Server   Apache 2.2.11

PHP      5.2.9-2



<?php



$Name = "sam"; //senders name

$email = "a...@example.com"; //senders e-mail adress

$recipient = "a...@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";

?>



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

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=15373


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=15373&edit=1

Reply via email to