Jump to content

simple mail question


stvchez

Recommended Posts

this should be fairly straightforward.  I need to simply send mail to a desired address.  I'm using the mail function, and doesn't seem to be working..

 

<form action="contactMail.php" method="post">

 

<table cellpadding=2 cellspacing=0 border=0>

<tr><td><b>Sender</b></td><td><input type="text" name="you"></td></tr>

<tr><td><b>Recipient</b></td><td><input type="text" name="to"></td></tr>

<tr><td><b>Title</b></td><td><input type="text" name="tit"></td></tr>

<tr><td><b>Message</b></td><td><textarea rows=6 cols=16 name="msg" ></textarea></td></tr>

<tr><td> </td><td><input type="submit" value="Send Now"></td></tr>

</table>

 

</form>

 

<?php

if ($_SERVER["REQUEST_METHOD"]=="POST"){

mail($_POST['to'], $_POST['tit'], $_POST['msg'],"From:" . $_POST['you']);

}

?>

Link to comment
Share on other sites

Chances are it is in the "From:" portion, If I were you I would remove that and see if the mail sends if it does than that is the issue if it doesn't than chances are it is in your POST data. I would than print_r($_POST) to make sure that my post data is what I expected.

 

--FrosT

Link to comment
Share on other sites

thanks for your reply.  I feel like i've been going around in circles.  I'm using two of my test accounts.  When I send the post to my gmail account, it makes it there everytime.  When I send to my comcast email, it never makes it no matter what I try.  The code is the same for the two

Link to comment
Share on other sites

Some servers get blocked from comcast, especially if you do not specify any headers. I know my server is blocked from AOL.

 

Best bet is to research mail headers and get the proper headers and try that.

 

--FrosT

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.