ここに私のPHPコードがあります:
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->CharSet="UTF-8";
$mail->SMTPSecure = 'ssl';
$mail->Host = 'smtp.gmail.com';
$mail->Port = 465;
$mail->Username = 'clubbedinapp@gmail.com';
$mail->Password = 'pw';
$mail->SMTPAuth = true;
$mail->From = 'clubbedinapp@gmail.com';
$mail->FromName = 'Clubbed In';
$mail->AddAddress('nishil.shah17@gmail.com');
$mail->AddReplyTo('clubbedinapp@gmail.com', 'Information');
$mail->IsHTML(true);
$mail->Subject = "PHPMailer Test Subject via Sendmail, basic";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
$mail->Body = "Hello";
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message sent!";
}
Gmail PHPMailer のチュートリアルに従いましたが、何が問題なのかわかりません。誰か助けてくれませんか?