0

Hello I am trying to send email through PHP Mailer, it outputs "Message has been sent" but I don't receive any email in my mailbox. Yesterday I received some email in my mailbox but today from no where again I am not receiving any email.

Here is the code sample :

<?php
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
//$mail->SMTPDebug = 3;                               // Enable verbose debug output
$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'cp-13.webhostbox.net';             // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'hey@handlebar.digital';                 // SMTP username
$mail->Password = '******';                           // SMTP password
$mail->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;                                    // TCP port to connect to
$mail->setFrom('bilalzafar256@gmail.com', 'Mailer');
$mail->addAddress('bilal.zafar@daewoo.com.pk', 'Joe User');     // Add a recipient
$mail->isHTML(true);                                  // Set email format to HTML
$mail->Subject = 'User Response From Website';
$mail->Body    = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}
?>

can anyone tell me what is the issue here ??

Bilal Zafar
  • 447
  • 7
  • 20

0 Answers0