Skip to content
Advertisement

How to fix send PHPMailer SMTP mail on GoDaddy Server 500 (Internal Server) Error

When I try to send a mail from GoDaddy Server by PHPMailer (SMTP) it shows the 500 (Internal Server) Error.

My Code Is:

    ini_set('display_errors', 1);
    error_reporting(E_ALL);

    require 'vendor/autoload.php';
    use PHPMailerPHPMailerPHPMailer;
    use PHPMailerPHPMailerException;

    $mail = new PHPMailer(true);


    $mail->isSMTP(); 
    $mail->Host = 'SERVER.secureserver.net';    // Must be GoDaddy host name
    $mail->SMTPAuth = true; 
    $mail->Username = 'EMAIL';
    $mail->Password = 'PASSWORD';
    $mail->SMTPSecure = 'tls';   // ssl will no longer work on GoDaddy CPanel SMTP
    $mail->Port = 587;    // Must use port 587 with TLS



  $mail->setFrom('EMAIL', 'NAME');
  $mail->addAddress('EMAIL', 'NAME');

  $mail->Subject = 'Mail Subject';
  $mail->Body = 'Mail Body';

  $send = $mail->send();
?>

It returns the 500 (Internal Server) Error.

Advertisement

Answer

For those who visited this page now.

GoDaddy email doesn’t support TLS

To ensure the highest level of security for your email, TLS versions 1.0 and 1.1 are no longer supported by GoDaddy.

Ref: https://in.godaddy.com/help/tls-10-and-11-end-of-support-41090


In this case, use Gmail or Outlook SMTP

You may follow this guides,

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement