Website Email Authentication for Contact Forms & More

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.

  • 0 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

My Website is Down

For security, your IP address (see https://www.linksky.com/ip/) may have been automatically and...

How Do I Change/Reset My Email Password?

For security, we recommend changing all of your passwords every few months. Also, if your email...

How Do I Login to Webmail?

To login to Webmail, open your Web browser (Chrome, Firefox, Edge, Safari, etc.) and visit:...

How Do I Add an Email Address?

LinkSky hosted email addresses are a great way to promote your business, because you can setup an...

SSL Certificate for My Website

Great news, we recently rolled out Let’s Encrypt certificates to members! The goal is to provide...