Jump to content

mail is not working ??!!


saumya

Recommended Posts

hi,

I have tried with below code

$uName='sam';
$to = "2saumyaray@gmail.com";
$from = 'r.saumya@yahoo.com';
$subject = "site feed back";
$message =  'message';
$headers  = "From: $from\r\n";

$config = "-fwebmaster@mycompany.com";

$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
Share on other sites

Try this

                                $msg2 = "A message";
   			$subject2 = "A Subject";
   			mail("$email", $subject2, $msg2,
   			"From: $mail_master\r\n" .
   			"Reply_To: $mail_master\r\n" .
  			"X-bounce-to: $mail_master\r\n" .
  			"X-Mailer: PHP/" . phpversion());

Link to comment
Share on other sites

[ code ][ /code ] Please!

 

Try this emailing script:

 

$to      = '$email';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: webmaster@noreply.com' . "\r\n" .
   'Reply-To: webmaster@noreply.com' . "\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
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='2saumyaray@gmail.com';
$to= '$email';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: webmaster@noreply.com' . "\r\n" .
   'Reply-To: webmaster@noreply.com' . "\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
Share on other sites

$to='2saumyaray@gmail.com';
$subject = 'A Subject';
$message = 'Hello there';
$headers = 'From: webmaster@noreply.com' . "\r\n" .
   'Reply-To: webmaster@noreply.com' . "\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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.