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
https://forums.phpfreaks.com/topic/42157-simple-mail-question/
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
https://forums.phpfreaks.com/topic/42157-simple-mail-question/#findComment-204500
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
https://forums.phpfreaks.com/topic/42157-simple-mail-question/#findComment-204521
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.