开发者

How can hide text when sending an email with php [closed]

开发者 https://www.devze.com 2023-03-30 12:10 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it开发者_运维技巧 can be reopened, visit the help center. Closed 10 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消