0

I want make an email script for users to be able to send me messages
and i getting Mail delivery failed: returning message to sender

this is the script

<ul>  
<li><form name="mail" method="POST"  
action="send_mail.php"></li>  
<li>To:</li>  
<li><input type="text" name="to"  
/></li>  
<li>Message:</li>  
<li><input type="text" name="Message"  
/></li>  
<li>From:</li>  
<li><input type="text" name="from"  
/></li>  
<li>CC:</li>  
<li><input type="text" name="cc"  
/></li>  
<li>&nbsp;</li>  
<li><input type="submit" name="submit"  
value="Send"/></li>  
<li>&nbsp;</li>  
</form>  
</ul> 

and the send_main.php

<?php  
  $to = $_POST['to'] ;      
  $message = $_POST['Message'] ;  
  $from = $_POST['from'];  
  $cc = $_POST['cc'];  
  $headers =  "From: ".$_POST['from']."\r\n" .  
"CC: ".$_POST['cc'];  
  mail( $to, "Mail", $message, $headers);  
?>
2
Contributors
2
Replies
16
Views
3 Years
Discussion Span
Last Post by SimonIoa
0

Do you know what the returned message states? I see you have specified a From address in the script so the bounce would be returned there.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.