ここにコードの簡単な修正があります
$mail = new PHPMailer();
$mail->IsMail();
$mail->setCharset = "UTF-8";
$mail->Host = "localhost";
// $mail->Port = "587"; you don't need it now
$mail->AddAddress("recipientAddress");
$mail->setFrom = "myEmail";
$mail->Subject = "Subject";
$mail->Username = "username";
$mail->Password = "password";
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->Send();
これで、より多くのデバッグ メッセージを取得し、エラーを追跡して修正できます :)
更新:わかりました簡単です:
関数 $mail->IsMail(); mail() 関数を使用してレターを送信する必要があることを示します。その他の方法は次のとおりです。
IsSendmail - sendmail コマンド経由。
IsQmail - qMail MTA 経由で直接。
IsSMTP - SMTP サーバー経由。