PDA

View Full Version : Mailed-by Header - Gmail



sg552
June 23rd, 2008, 12:48
Hello,

Anyone here use gmail?? So they must know every email has Mailed-by header. eg: Mailed-by server2.kool.com but some email in my gmail inbox don't have this header. My question is, is there anyway I can hide this Mailed-by header??

This script is with the help from JohnN and BMR777>>


<?php
// -----------------------------------------
// The Web Help .com
// -----------------------------------------
// remember to replace you@email.com with your own email address lower in this code.

// load the variables form address bar
$to = $_REQUEST["to"];
$to = preg_replace("/[^a-zA-Z0-9@._-]/", "", $to);

$to = explode(",",$to);
$to = $to['0'];

$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sendname = $_REQUEST["sendname"];
$from = $_REQUEST["from"];
$verif_box = $_REQUEST["verif_box"];
$headers = "MIME-Version: 1.0" . "\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSmail-Priority: High\n";
$headers .= 'From: ' . $sendname . ' <' . $from . ">\r\n" . 'Reply-To: ' . $from . "\r\n";


// remove the backslashes that normally appears when entering " or '
$to = stripslashes($to);
$message = stripslashes($message);
$subject = stripslashes($subject);
$sendname = stripslashes($sendname);
$from = stripslashes($from);

// check to see if verificaton code was correct
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
// if verification code was correct send the message and show this page
mail($to, $subject, $message, $headers);
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
} else {
// if verification code was incorrect then return to contact page and show error
header("Location:http://www.mydomain.com/?wrong_code=true");
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>E-Mail Sent</title>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style></head>

<body>
Email sent. Thank you.<br />
<br />
Return to <a href="/">home page</a> ?
</body>
</html>

The closest help I could find is from this website,
http://discuss.joyent.com/viewtopic.php?pid=144507
but I have no idea how to implement it in my web form :/

Hope somebody can help me with this. Thanks in advance :)

iBrightDev
June 23rd, 2008, 14:30
i could be wrong, but, i believe if you remove it, then it wont make it to gmail. i have seen a lot of php mail forms get rejected from email sites like gmail, yahoo, hotmail etc., so, might be better to just leave it alone.

hostrazer
June 24th, 2008, 16:59
I think you do not need to remove this header because of email rejection.

sg552
June 25th, 2008, 12:38
i could be wrong, but, i believe if you remove it, then it wont make it to gmail. i have seen a lot of php mail forms get rejected from email sites like gmail, yahoo, hotmail etc., so, might be better to just leave it alone.


I think you do not need to remove this header because of email rejection.

So how come some email don't have header like below :confused4

http://xs228.xs.to/xs228/08263/noheader543.png (http://xs.to)


but some have:confused4
http://xs228.xs.to/xs228/08263/header698.png (http://xs.to)

how to remove the mailed-by titan.dnsprotect.com I don't want my recepient to see the header.

If anyone using reseller or free hosting, try sending email to gmail with php mail, maybe you will see you host nameserver...:idea:

iBrightDev
June 25th, 2008, 13:15
that is a good question, but, i unfortunately dont have an answer for that. sorry.