PHPMailer - No Error with SendMail but no Email Received

  • updated
  • Answered

I am trying using PHPMailer to send email, the script executed successfully without error but email was not received.

Below is the email server settings, please anyone tell me if anything is wrong wit these settings.
Thanks for your help.

function serverSettings($mail)
      $mail->SMTPDebug = 2; // for detailed debug output
      $mail->Host = 'localhost';
      $mail->SMTPAuth = true;
      $mail->SMTPSecure = 'ssl';
      $mail->Port = 465;

      $mail->Username = '[email protected]'; // YOUR mail email
      $mail->Password = 'mypassword'; // YOUR mail password
IMH Support Agent 1
  • Answered


Thank you for contacting us with issues using PHPMailer. I recommend checking your mail logs to see if it is authenticating successfully with your mail server or to check for any records of transmissions. This may provide specific errors or clues into what is happening.

As a test, try using the specific hostname for your SMTP server. If your problems persist, it can be helpful to download the latest source code for PHPMailer 6.6.5  and review the file. It includes a basic example of using the code.

Thank you,