【发布时间】:2014-04-30 05:43:36
【问题描述】:
我正在尝试向在我的网站上注册的用户发送一封确认电子邮件。
问题是电子邮件是从我的默认 cpanel 电子邮件帐户发送的(根据 Hostgator 无法更改)。
我在 cpanel 中设置了其他电子邮件地址。我不能使用其中一个发送吗?
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to=$user;
// Your subject
$subject="Confirmation link";
// From
$header="from: your name <your email>";
// Your message
$message="Your confirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://mysite.co/confirmation.php?passkey=$confirm_code";
// send email
$sentmail = mail($to,$subject,$message,$header);
【问题讨论】:
-
@TimWolla 我认为它们根本不相似。我错过了什么吗?
标签: php