- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I am sending email using php when any user added comments to my comments but i did not received any mail .
i used mail() function for sending mail.
could any one plz tell me how to solve this issue and is any alternate methods are there for sending using PHP.
regards,
Raghavendrachari
Have you tried using the mail function separately? What I mean is, have you tried letting it send you the email after filling in a form and clicking the submit button? Maybe there is something wrong and your code won’t recognize it correctly when someone added a comment. Even better maybe would be to see the code.
This is the code which i am using
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "rn" .
'Reply-To: [email protected]' . "rn" .
'X-Mailer: PHP/';
echo "";
if (mail($to, $subject, $message, $headers)) {
echo("Message successfully sent!
");
} else {
echo("Message delivery failed...
");
}
?>
No .. it displays ‘Message delivery failed…!!!’
Hi,
Thank U
I tried what u said but same problem facing ; after header parameter removed same ‘Failure error message’.
Is there any alternate method or how can i checkl php error logs,where it was stored in logs.
regards,
Raghavendrachari
Are you testing this on a local or live server?
on local server having internet access.. !!
i tried from other system via internet .. also same issue is coming..!!
is there any possibility of source code which will execute properly ?? plz send
thank U
Testing mail functions on a local server requires further set up. Try testing it on a live server.