删除 php 电子邮件中的“via us-imm-node4c.000webhost.io”

问题描述 投票:0回答:1

我已经测试了一个 php 脚本来发送电子邮件。当消息到达时,它会显示:genera01.000webhost.com via us-imm-node4c.000webhost.io

我寻找了有关如何删除 via us-imm-node4c.000webhost.io 部分的信息,但我什么也没找到

php代码是这样的:

 <?php
$to      = '[email protected]';
$subject = 'the subject';
$message = '<html>
<body>
  <p><a href="https://www.w3schools.com">Visit W3Schools</a></p>
</body>
</html>';
$headers = 'From: genera01.000webhost.com' . "\r\n" .
    'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to, $subject, $message, $headers);
?>
php email gmail
1个回答
0
投票

据我所知,你无法摆脱它。你可以尝试写一些没有@的东西,所以它会说你想要的东西+“@us-imm-node4c.000webhost.io”。

<?php
$to      = '[email protected]';
$subject = 'the subject';
$message = '<html>
<body>
  <p><a href="https://www.w3schools.com">Visit W3Schools</a></p>
</body>
</html>';
$headers = 'From: Write something you want' . "\r\n" .
    'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to, $subject, $message, $headers);
?>
© www.soinside.com 2019 - 2024. All rights reserved.