Hestia SMTP Relay Not Sending (Multiple Providers Tried) - Hestia 1.9.3 / PHP 8.3

Hi everyone,

First off, a huge thank you to this community and developers like @sahsanu. With your help, I’ve managed to fix several major issues on my server recently, including getting the File Manager and UI Database Downloads working perfectly, and securing the server much better! I’m learning a lot.

Now, I’m stuck on one last piece: getting Hestia’s system email alerts to send via an external SMTP relay. I’ve disabled local Exim/Dovecot and want Hestia to send notifications (like backup status, maldet alerts if it uses the system mailer, etc.) through a third-party service.

Server Info:

  • HestiaCP Version: 1.9.3
  • Hestia Panel PHP Version: 8.3.17
  • OS: Ubuntu 22.04.5 LTS
  • Local Mail Server (Exim/Dovecot): Disabled.

The Problem:

I’ve tried configuring three different SMTP relay services using /usr/local/hestia/install/upgrade/manual/configure-server-smtp.sh, but in each case, test emails (e.g., triggered by sudo /usr/local/hestia/bin/v-backup-user admin) are not being sent. There’s no record of the email attempt in the SMTP provider’s “Sent” logs or activity dashboard, and the notification email is not received. Hestia’s own logs (/var/log/hestia/error.log, system.log, and /var/log/nginx/error.log for the panel) don’t show any specific SMTP connection or authentication errors during these attempts.

Services Tried & Steps Taken for Each (using mydomain.com as example sending domain):

  1. Gmail (with App Password):
  • 2-Step Verification enabled on Gmail account.
  • Generated a 16-digit App Password.
  • Configured Hestia SMTP with: smtp.gmail.com, port 587, security TLS, username (full Gmail address), App Password. Also tried port 465 with SSL.
  • telnet smtp.gmail.com 587 (and 465) from server was successful.
  • Result: No email sent, nothing in Gmail “Sent” folder.
  1. Elastic Email (Free Tier):
  • Signed up with account [email protected].
  • Successfully authenticated sending domain mydomain.com (SPF, DKIM, verification code, DMARC all verified in their dashboard).
  • Obtained SMTP credentials: Host smtp.elasticemail.com, Port 2525, Username [email protected], API Key as password.
  • Configured Hestia SMTP with these details, using TLS security.
  • telnet smtp.elasticemail.com 2525 from server was successful.
  • Result: No email sent, “0 Submitted” in Elastic Email activity log.
  1. Brevo (formerly Sendinblue - Free Tier):
  • Signed up.
  • Successfully authenticated sending domain mydomain.com (SPF: include:brevo.com, DKIM via CNAMEs, Brevo code, DMARC all verified in their dashboard).
  • Obtained SMTP credentials: Host smtp-relay.brevo.com, Port 587, Login [BREVO_SMTP_LOGIN], generated SMTP Key as password.
  • Configured Hestia SMTP with these details, using TLS security.
  • telnet smtp-relay.brevo.com 587 from server was successful.
  • Result: No email sent, “Waiting for log” (no activity) in Brevo’s transactional dashboard.

Current Hestia SMTP Configuration (Example from Brevo attempt, but all failed similarly): (Output of sudo grep '^SERVER_SMTP' /usr/local/hestia/conf/hestia.conf)

SERVER_SMTP_ADDR='[email protected]' # Or [email protected]
SERVER_SMTP_HOST='smtp-relay.brevo.com'
SERVER_SMTP_PASSWD='***************************' # Actual SMTP Key/Password
SERVER_SMTP_PORT='587'
SERVER_SMTP_SECURITY='TLS'
SERVER_SMTP_USER='[BREVO_SMTP_LOGIN]'
USE_SERVER_SMTP='true'

(Currently, I’ve set USE_SERVER_SMTP='false' since it’s not working).

Question:

Given that direct SMTP port connectivity from the server is fine, and domain authentication with the providers is complete, why would Hestia be failing to send emails through these relays without logging any specific errors? Is there a known issue with the SMTP relay function in Hestia 1.9.3 or its interaction with PHP 8.3.17? Are there more detailed PHP mailer logs within Hestia I can check, or other diagnostics I can perform?

I’m really trying to get this last piece working so the server can send its own alerts. Any guidance or suggestions would be hugely appreciated!

Thanks so much,

Newbie (but learning!)

1 Like

This is the part reponsible for sending panel emails

\

1 Like

Hi everyone,

First, a huge thank you especially to eris, a developer that over the years that I embraced HestiaCP has been a big friend, helping quite a few times to solve a few things, some only a magician like him could perform in minutes. I can never repay you for what you did for me and do for this great community.

Your recent hint about the send_email function being in hestiacp/web/inc/main.php (around lines 455-491) was a great pointer, thank you! I’ve been trying to dig into this SMTP relay issue further based on that.

Recap of Problem:

My Hestia server (v1.9.3, Panel PHP 8.3.17, Ubuntu 22.04.5 LTS, local Exim/Dovecot disabled) is not successfully sending system alerts via external SMTP relays (tried Gmail, Elastic Email, and Brevo). The providers show my domain (mydomain.com) as fully authenticated (SPF, DKIM, etc.), telnet from the server to their SMTP hosts/ports works, but no emails are logged as sent by them, and nothing is received. Hestia’s own logs don’t show specific SMTP errors.

Further Troubleshooting Steps Taken (after the main.php hint):

  1. Attempted to Enable PHPMailer Debugging:
  • I made a backup of /usr/local/hestia/web/inc/main.php .
  • For testing, I then edited the send_email function in my live main.php file, specifically adding/modifying these lines where PHPMailer is configured for SMTP:
$mail->SMTPDebug = 2; // Tried 2, and even 4 for max verbosity
$mail->Debugoutput = 'error_log'; 
  • My hope was this would output detailed SMTP transaction logs to /var/log/nginx/error.log (as the panel runs PHP-FPM).
  1. Re-configured and Re-tested Brevo SMTP Relay:
  • With the (attempted) debugging in main.php , I ensured Hestia’s SMTP relay was enabled and configured with my current Brevo details. I did this both via the terminal script:
sudo /usr/local/hestia/install/upgrade/manual/configure-server-smtp.sh
  • And also tried via settings in the HestiaCP UI (Server Settings > Configure > Mail Server > Global SMTP Relay).
  • All details (Host: smtp-relay.brevo.com , Port: 587 , User: [MY_BREVO_SMTP_LOGIN] , my Brevo SMTP key as password, Security: TLS , and From address: [email protected] which is verified with Brevo) were confirmed correct.
  • I even used the “Regenerate SMTP Login and Master password” option in Brevo to get a fresh SMTP key, updated this new key in the Hestia UI, and tested again.
  1. Triggered Test Emails:
  • To ensure Hestia had a reason to send an email, I performed actions like creating a new temporary test user, running a backup for the admin account (sudo /usr/local/hestia/bin/v-backup-user admin ), and then deleting the temporary test user.
  1. Checked Logs & Brevo Dashboard:
  • Unfortunately, even with the SMTPDebug changes, I still couldn’t find any detailed SMTP transaction logs or specific PHPMailer errors in /var/log/nginx/error.log , /var/log/hestia/error.log , or /var/log/hestia/system.log . The logs just showed the Hestia commands running successfully (like the backup completing), but no mail-specific errors from the relay attempt.
  • My Brevo dashboard (“Transactional” section) shows my domain mydomain.com is fully authenticated (SPF, DKIMs, Brevo code, DMARC all show “success”). However, it shows no activity from Hestia’s attempts – no logs of submitted emails, no deferrals, no bounces.

It really feels like Hestia isn’t successfully making the hand-off to Brevo’s (or any other provider’s) SMTP server, and it’s failing silently without clear errors in the standard logs, even when trying to enable PHPMailer’s debugging in main.php .

Question:

What else can I try or check to diagnose why Hestia’s send_email function might not be working with the external SMTP relay? Are there other specific Hestia logs or PHP-FPM logs I should be looking at for more detailed mailer errors, or a specific way to enable more verbose logging for this function that I might have missed? Could there be something in the main.php code (lines 455-491) that might need adjustment for current PHP versions or relay services that a developer might spot?

Thanks again for any guidance – really appreciate the help from this great community!

Best,

Newbie (still learning a lot!)

It should be working as it using phpmailer

So add some debug code if it is fired

Also try send email via the pannel it self (Password forgotten) and see if that arrives

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.