Quantcast
Channel: WordPress.org Forums
Viewing all articles
Browse latest Browse all 46187

deadbird on "sendmail ok from command line, not from WP"

$
0
0

News: I tested phpmailer class used by WP with this:

<?php
include "./wp-includes/class-phpmailer.php";
$mail = new PHPMailer();
$mail->IsMail();

$mail->AddAddress("deadbird99@gmail.com");
$mail->Subject = "Test 1";
$mail->Body = "Test 1 of PHPMailer.";

if(!$mail->Send())
{
echo "Error sending: " . $mail->ErrorInfo;;
}
else
{
echo "Letter sent";
}
?>

It works perfectly! What the heck?


Viewing all articles
Browse latest Browse all 46187

Trending Articles