Письмо PHP не отправляется с ключом активации
Я не могу заставить этот кусок кода работать, я знаю, как использовать почтовую часть PHP и не могу понять, в чем дело.
##Send activation Email
$to = $_POST['email'];
$subject = " YOURWEBSITE.com Registration";
$message = "Welcome to our website!\r\rYou, or someone using your email address, has completed registration at YOURWEBSITE.com. You can complete registration by clicking the following link:\rhttp://www.YOURWEBSITE.com/verify.php?$activationKey\r\rIf this is an error, ignore this email and you will be removed from our mailing list.\r\rRegards,\ YOURWEBSITE.com Team";
$headers = 'From: noreply@close2.me';
mail($to, $subject, $message, $headers);
1 ответ
Смотрите ниже уроки
http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html
http://php.net/manual/en/function.mail.php
отправка почты с использованием проверки подлинности SMTP является одним из решений, или вы можете использовать почтовые библиотеки, такие как Swift Mailer