我有一个PHP网站,其中用户填写他们的注册详细信息,并通过电子邮件发送给他们,并提供激活其帐户的链接。问题是,有时激活电子邮件会发生,有时它不会。我想确保在每次注册后,激活链接电子邮件都会发送给订阅者以激活他的帐户。现在,除非用户告诉我们,否则无法跟踪此情况。为了解决这个问题,我还想在我的电子邮件地址上获得该电子邮件的副本,以便它作为额外的确认。
以下是当前的代码,我们非常感谢您解决此问题的任何帮助 -
$qq = "select * from quiz_tmpreg where id='".$_SESSION['uid']."'";
$ex = mysqli_query($dbcon, $qq);
$trp = mysqli_fetch_array($ex);
$ToEmail = $trp['email'];
$EmailSubject = "Registration Details";
$mailheader = "From: "."orders@company.com"."\r\n";
$mailheader .= "Reply-To: ".'orders@company.com'."\r\n";
$mailheader .= "Content-type: text/html; charset=utf-8\r\n";
$MESSAGE_BODY = " User Name :- " .$trp['uname']. ",<br>";
$MESSAGE_BODY .= " Password :- " .$trp['pass']. ",<br>";
$MESSAGE_BODY .= " Your Unique ID :- " .$_SESSION['uniq_id']. ",<br>";
$MESSAGE_BODY .= " Activation Link :- http://company.com/confirm.php? encrypt=".$_SESSION['uid']."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader);
unset($_SESSION['uid']);
答案 0 :(得分:0)