Starting Wednesday, July 15, 2026, all unauthenticated email will be rejected, to reduce spam and phishing.
Email sent via a website (e.g. contact form) must authenticate using an email account in cPanel -> Email section -> Email Accounts.
WordPress
Install and configure a WordPress plugin, such as WP Mail SMTP, GoSMTP, etc.
PHPMailer
Update existing PHP code using PHPMailer to authenticate when sending email through the website.
Here is sample PHP code to authenticate when sending with PHPMailer:
<?php
// Make sure you have installed PHPMailer via Composer:
// composer require phpmailer/phpmailer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$mail = new PHPMailer(true);
try {
// Server settings
$mail->isSMTP(); // Use SMTP
$mail->Host = 'mail.example.com'; // SMTP server
$mail->SMTPAuth = true; // Enable authentication
$mail->Username = 'your_email@example.com'; // SMTP username
$mail->Password = 'your_password'; // SMTP password
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Use SSL encryption
$mail->Port = 465; // Port for SSL
// Optional: handle self-signed certificates
$mail->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
];
// Sender & recipient
$mail->setFrom('your_email@example.com', 'Your Name');
$mail->addAddress('recipient@example.com', 'Recipient Name');
// Content
$mail->isHTML(true);
$mail->Subject = 'Test Email via PHPMailer SSL Port 465';
$mail->Body = '<h1>Hello!</h1><p>This is a test email sent using PHPMailer over SSL (port 465).</p>';
$mail->AltBody = 'Hello! This is a test email sent using PHPMailer over SSL (port 465).';
// Send email
$mail->send();
echo "Message has been sent successfully.";
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
Please let us know if you have any questions or need further help.
