PHPMailer - cannot get it to work

Hi

I have been spending hours trying to get PHPMailer working but I am getting nowhere.

I am getting no errors but no emails also.

I have tried some setup's shown on the forum but again nothing is working.

Here's my code -

include_once('inc/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPAuth = true; // telling the class to use SMTP Auth
$mail->Username = '[email protected]'; // my actual smtp Username
$mail->Password = 'Password'; // my actual smtp password
$mail->Host = "mail.mydomain.co.uk"; // SMTP server
$mail->From = "[email protected]";
$mail->AddAddress("[email protected]"); // a working email address
$mail->Subject = "Test Query";
$mail->Body = "Test from phpmailer";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}

As I mentioned - no errors but no emails either.

The 'echo's' following if(!$mail->Send()) { don't get shown, so it maybe the script is failing somewhere and not error reporting.

I have class.phpmailer.php, class.smtp.php and phpmailer.lang-en.php all in the same directory (mydomain/inc)

Any help please?

Thanks

Kevin
PS I am on UNIX, web2 I think;(
 
Just tried a very simple test using mail() - one which works great on another JoDo hosted site, but again no emails are going out.

Weird
 
Back
Top