PHP:通过链接发送邮件 [英] PHP: Send mail with link

查看:218
本文介绍了PHP:通过链接发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下PHP代码:

Im using following php code:

$mailacc = "example@example.com";

$subject = "Hello";

$message = "
<html>
<head>
  <title>Test Mail</title>
</head>
<body>
    <p><a href='http://stackoverflow.com'>Open Link</a></p>
</body>
</html>
";

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Noreply <noreply@example.com>' . "\r\n";

$mail = mail($mailacc, $subject, $message, $headers);

但是,当我删除链接并放入一些文本时,dosent发送邮件。为什么我的邮件中没有链接? PS:$ mailacc是我真正的电子邮件帐户。

But it dosent send the mail, when I remove the link and put in some text it workes. Why can't I have a link in my message? PS: $mailacc is my real email account.

Thx!

推荐答案

p>如果没有发送邮件,这是服务器本身的问题,它无法发送邮件。
(否则:检查垃圾邮件夹)

If it doesn't send the mail, it's an issue with the server itself.. it is unable to send mails. (Or otherwise: check the spam-folder)

这篇关于PHP:通过链接发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆