Hello.
I am trying to use PHPMailer, but for some reason it doesn't print or do anything.
THis is my code:
<?php
echo "yoo i got here already (first)";
#require '/etc/phpmail/phpmailer/phpmailerautoload.php';
echo "test";
$mail = new PHPMailer;
$mail->isSendmail();
$mail->setFrom('@@@@', 'First Last');
$mail->addAddress('@@@@', 'John Doe');
$mail->Subject = 'PHPMailer sendmail test';
$mail->Body = 'This is a plain-text message body';
echo "yoo i got here already (second)";
if (!$mail->send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?>
If i comment the required, it'll echo the test, if i dont comment out the require, it wont echo test.
I dont know whats the problem, and the link to the file is correct, tried it out my self.