When I send an email with php, the details of the mail appear like this:
http://i.stack.imgur.com/tiWzB.jpg
I don't want 'zastava.websitewelcome.com' to be displayed. I want to hide it like in this example:
http://i.stack.imgur.com/i8mNL.jpg
<?php
$to = 'admin@mydomain.com' . ', '; // note the comma
$subject = 'Hi how are you?';
// message
$message = '
<html>
<head>
<title>Hi </title>
</head>
<body>
<p style="font-family:Tahoma;font-size:16px;color:red">
hi how are you
</p>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: sss <admin@mydomain.com>' . "\r\n";
$headers .= "From: asdf <admini@gmail.com>" . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
The question you're actually asking is "how can I trick Google's security features?" Google displays extra information about the sender if it doesn't completely trust that you are who you say you are. This is because you can claim to be anyone you want in an email, and this can trick unsuspecting users into giving up personal information to a third party by making them believe they are someone they are not.
You are seeing this "via domain.tld" addition to your emails because you are sending an email from one domain, but claiming it came from a separate domain. This makes Google very suspicious, since they see it as misrepresenting who you are.
There is more information in this page, but the short answer is that you either have to send mail from the domain you're claiming to be sending it from, or you have to prove to Google that you're authorized to send email from that domain.
精彩评论