I am using bbpress for my forums site. I have free hosting service for this at some host. The problem is that, sending a mail from my forums to users take very long, up to 20 minutes. This is due to the free hosting service I am using as said by the support. And gmail SMTP is recommended for better results. Now I want to send mails via Gmail SMTP to the users so that it would reach faster. But how is the question. For a check, I created the page shown below, but even that won't send any mail to the set destination. <?php require('/bb-includes/backpress/class.mailer.php'); $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = "ssl://smtp.gmail.com:465"; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "****@****.net"; // SMTP username $mail->Password = "******"; // SMTP password $mail->SMTPDebug = true; $mail->From = '****@****.net'; $mail->FromName = '***** Forums'; $mail->Subject = "Here is the subject"; $mail->Body = "This is the <b>HTML body</b>"; $mail->AltBody = "This is the text-only body"; if(!$mail->Send()) { echo "Message was not sent <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; ?> PHP: