我没有收到用户注册后发送的电子邮件

时间:2015-12-31 18:34:46

标签: php email xampp

当用户创建帐户时,他会自动获取包含用户名和密码的电子邮件。

Football
United Kingdom
Barclays Premier League
Aston Villa
Norwich City

的php.ini

$msg = "Hello '$username'\nLogin Data:\n\nUsername: '$username'\nPassword: '$password'\n\nThank you for registering here!";
// Send mail
$to = $email;
$subject = "Welcome";
$headers = "From:mail@gmail.com\r\n";
mail($to, $subject, $msg, $headers);
header("refresh:5;url=../index.html");
echo 'Registration successful. You\'ll be redirected in about 5 seconds. If not, click <a href="../index.html">here</a>.';

sendmail.ini

 SMTP = smtp.gmail.com
 smtp_port = 25
 sendmail_from = email@gmail.com
 sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
 sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

我做错了什么吗? :)

0 个答案:

没有答案