hi, i am using mail() function like this: $headers = "From: {$u}"; $t="$_POST[email]"; $s="Welcome To {$_SERVER[HTTP_HOST]}"; $m="Welcome\n\n\n\nYou Are Now a Member of $_SERVER[HTTP_HOST] and we are glad that you chose to join us.\n\nBefore Uploading Your First Pic You Must Confirm Your Email Id By Using This Link:\nhttp://$_SERVER[HTTP_HOST]/verify.php?u=base64_encode($_POST[uname])\n\n\nYou Will Be Redirected to our homepage on success.\n\n\n\n\nThank You."; mail($t,$s,$m,$headers) or die("mail sending error"); PHP: $u is the email id of me here. i am not getting an error bu it is not sending a email to $_POST. can u help in fixing it?
do all $_POST[] as $_POST[''] , meaning that for the variable $t you assign the value as : $t = $_POST['email']; $s = 'Welcome to '.$_SERVER['HTTP_HOST']; and so on.
I honestly don't think you did.Try this : <?php $headers = "From: {$u}"; $t = $_POST['email']; $s = "Welcome To ".$_SERVER['HTTP_HOST']; $m = "Welcome\n\n\n\nYou Are Now a Member of ".$_SERVER['HTTP_HOST']." and we are glad that you chose to join us.\n\nBefore Uploading Your First Pic You Must Confirm Your Email Id By Using This Link:\nhttp://".$_SERVER['HTTP_HOST']."/verify.php?u=".base64_encode($_POST['uname'])."\n\n\nYou Will Be Redirected to our homepage on success.\n\n\n\n\nThank You."; mail($t,$s,$m,$headers) or die("mail sending error"); ?> PHP:
i did the same.it didn't worked.so i started experimenting with the code. strangely making $t="from: ".$u; worked. i just made From to from .