PHP邮件功能将x-msg添加到所有链接......?

40P*_*lot 2 php email

邮件很好但链接看起来像这样:x-msg://63/'www.something.com/'

$from_user = $_POST["fromuser"];
$subject = $_POST["subject"];

$headers = "From: $from_user <{$_POST['fromemail']}>\r\n". 
               "MIME-Version: 1.0" . "\r\n" . 
               "Content-type: text/html; charset=UTF-8" . "\r\n" .  "X-Mailer: PHP/" . phpversion();

     if(mail($_POST["toemail"], $_POST["subject"], wordwrap(urldecode($_POST["ebody"]),70), $headers)){
     ...
     }
Run Code Online (Sandbox Code Playgroud)

它与服务器有关吗?

身体的代码:

$this->ebody = "<html><head><title>" . $this->subject . "</title></head><body>
<img src='$imageurl' height='65px'><p><strong>AUTOMATED ORDER FORM.</strong>

</p>Please do not reply this message.<p>" . $body . "</p><hr>All Rights Reserved.<br><a href='http://www.something.com'>Company Name.</a></body></html>";
Run Code Online (Sandbox Code Playgroud)

生成的电子邮件(原始来源):

> To: ###@gmail.com Subject: New Order - 14/06/12 MIME-Version: 1.0
> Content-type: text/html; charset=utf-8 X-Priority: 3 X-Mailer:
> PHP5.2.9 From: KSONE <noreply.ksone@something.com> Reply-To: Sales
> <sales@something.com>
> 
> 
> <html><head><title></title></head><body><img
> src=\"http://www.something.com/imgs/logo.png\"
> height=\'65px\'><p><strong>AUTOMATED VENDOR ORDER
> FORM.</strong></p>Please do not reply this message 027777777<p>Hello
> World!</p><hr>1/76 All Rights Reserved 12120.<br><a
> href=\'http://www.something.com\'>Company Co., Ltd.</a></body></html>
Run Code Online (Sandbox Code Playgroud)

dec*_*eze 8

AFAIK x-msg://是Mail.app预先添加到没有有效方案的所有链接的占位符方案.换句话说,您的链接可能看起来像://foo/bar或类似的东西,在这种情况下,Mail.app插入x-msg以创建一个完整,有效的URI.

修复应用中的链接以发送完整有效的网址.

  • @ 40Plot`some.com`不是有效的**URL**.它只是一个有效的*域*. (3认同)