Jump to content

mail is not working ??!!


saumya

Recommended Posts

hi,

I have tried with below code

$uName='sam';
$to = "[email protected]";
$from = '[email protected]';
$subject = "site feed back";
$message =  'message';
$headers  = "From: $from\r\n";

$config = "[email protected]";

$success = mail($to, $subject, $message, $headers,$config);
if ($success)
echo('msg=Your message has been sent successfully.');
else
echo "msg=An error occurred when sending the email.";

Result is showing the confirmation message, but There is actually no mail sent :( :( !!!!

Link to comment
https://forums.phpfreaks.com/topic/44113-mail-is-not-working/
Share on other sites

[ code ][ /code ] Please!

 

Try this emailing script:

 

$to      = '$email';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: [email protected]' . "\r\n" .
   'Reply-To: [email protected]' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

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

if ($sent){
echo "Message Sent!";}
else {
echo "Message could not be sent";}

Link to comment
https://forums.phpfreaks.com/topic/44113-mail-is-not-working/#findComment-214216
Share on other sites

i have modified the script and now my php file contains the below code.

now it says "message sent", I think this is because "if" condition is checked after the mail() function.

But the problem is still there, no mail is sent but message is "mail sent" !!

$email='[email protected]';
$to= '$email';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: [email protected]' . "\r\n" .
   'Reply-To: [email protected]' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

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

if ($sent){
echo "Message Sent!";}
else {
echo "Message could not be sent";}

Link to comment
https://forums.phpfreaks.com/topic/44113-mail-is-not-working/#findComment-214222
Share on other sites

$to='[email protected]';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: [email protected]' . "\r\n" .
   'Reply-To: [email protected]' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

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

if ($sent){
echo "Message Sent!";}
else {
echo "Message could not be sent";}

:( no luck

Link to comment
https://forums.phpfreaks.com/topic/44113-mail-is-not-working/#findComment-214244
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.