mail function not working correctly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amarniit
    New Member
    • Sep 2009
    • 13

    #1

    mail function not working correctly

    hello,

    i a creating a enquery form on my website but i am ot able to use php mail function. i try this code but mail not sent to my id. please suggest me how can i correct this code.


    Code:
    <?php
    									}else{
    										if (isset($_POST["from"])) {
    											$email_a = $_POST["email"];
    											$headers =  "From: ".$email_a. "\r\n" . 
    											$subject = $_POST["subject"];
    											$message = $_POST["message"];
    											// message lines should not exceed 70 characters (PHP rule), so wrap it
    											$message = wordwrap($message, 70);
    											// send mail
    											mail("amarniit@gmail.com",$subject,$message,$headers);
    						echo '<tr><td></td><td align="left" valign="top" ><div style="padding:20px;">Thank you for sending us feedback</div></td></tr>';
    															
    											}
    											}
    										?>

    my website is
    Last edited by Dormilich; Nov 6 '14, 11:03 AM. Reason: please use code tags
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    have you checked your spam folder? mails like that where the FROM email address (gmail.com) does not match the sending server (kanjitour.com) are likely to end up there

    Comment

    Working...