对于电子邮件激活,我使用的是php Sendmail代码。
我不是使用任何'Smtp或Php邮件功能‘,而是使用一个’变量‘。每当我附上一个子域名与我的激活链接,它没有工作,没有邮件是发送。但是当我用激活链接附加一个域名时,它会工作,并且会发送一封邮件。子域名不发送邮件和相同的代码,而只是将子域名更改为域名的原因可能是什么?为什么?
这是我的密码:
$to=$email;
$subject="Your confirmation link here";
$header="from: Meet Your Love<your email>";
$message="Your Comfirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://meetyourlove.2fh.co/confirmation.php?passkey=$confirm_code";
$sentmail = mail($to,$subject,$message,$header);在第三个$message,您可以看到我的子域名从2免费网站托管,这是附加与confirmation.php的工作,以激活一个电子邮件地址,但这个子域链接不让我发送一个激活链接的用户电子邮件地址。当我在它中更改任何域名时,它发送邮件的原因可能是什么??解决这个问题的最佳方法是什么?我们到底应该在/confirmation.php之前放置什么链接?
请帮帮我..!
发布于 2014-06-30 09:04:44
试试这段代码,
$from="katrinakaif@love.com";
$to ="yourmail@gmail.com";
$confirm_code="13";
$message="Your Comfirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://meetyourlove.2fh.co/confirmation.php?passkey=$confirm_code";
$subject="test";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From:'.$from . "\r\n";
mail($to, $subject, $message, $headers);https://stackoverflow.com/questions/24485480
复制相似问题