Skip to content

[Bug]: Mail over SMTP is not being sent #861

@mkleger

Description

@mkleger

Describe the problem

I want to send emails via SMTP, but when I try to do so with the following settings, I only get “Success: The user has been created successfully. NOTE: Failed to send login details via email.” With exactly the same data, I can send emails via PHP without any problems.

Settings:
'mail' => [
'enabled' => true,
'from' => 'support@xyz.ch',
'from_name' => 'DNS Administrator',
//'return_path' => 'support@xyz.ch',
'transport' => 'smtp',
'host' => 'mail.xyz.ch',
'port' => 587,
'username' => 'support@xyz.ch',
'password' => 'xxx',
'encryption' => 'tls',
'auth' => true,
],

Error log:
[Sat Nov 29 15:44:59.457195 2025] [proxy_fcgi:error] [pid 886747:tid 886747] [client 109.205.201.183:6122] AH01071: Got error 'PHP message: 2025-11-29T14:44:59+00:00 [DEBUG]: [SessionAuthenticator] Starting authentication process; PHP message: 2025-11-29T14:44:59+00:00 [DEBUG]: [SessionAuthenticator] Session timestamp updated for user admin [{"username":"admin"}]; PHP message: 2025-11-29T14:44:59+00:00 [INFO]: [SessionAuthenticator] User admin uses SQL for authentication [{"username":"admin"}]; PHP message: 2025-11-29T14:44:59+00:00 [INFO]: [SqlAuthenticator] Starting authentication process.; PHP message: 2025-11-29T14:44:59+00:00 [INFO]: [SqlAuthenticator] Session ID regenerated for user admin [{"username":"admin"}]; PHP message: 2025-11-29T14:44:59+00:00 [INFO]: [SqlAuthenticator] MFA is required for user admin [{"username":"admin"}]; PHP message: [MfaSessionManager] MFA required set for user: 2; PHP message: 2025-11-29T14:44:59+00:00 [INFO]: [SqlAuthenticator] Authentication process completed successfully for user admin [{"username":"admin"}]; PHP message: 2025-11-29T14:44:59+00:00 [DEBUG]: [SessionAuthenticator] Authentication process completed for user admin [{"username":"admin"}]; PHP message: 2025-11-29T14:44:59+00:00 [DEBUG]: Attempting to send email [{"to":"xyz@xyz.ch","subject":"Your new account information","has_plain_body":true,"additional_headers":0}]; PHP message: 2025-11-29T14:44:59+00:00 [ERROR]: Mail server connection test failed: (0); PHP message: 2025-11-29T14:44:59+00:00 [WARNING]: Mail sending failed: mail configuration is invalid or mail server is unreachable', referer: https://dns-admin.xyz.ch/index.php?page=add_user

What exactly am I doing wrong?

Steps to reproduce

Create a new user and send the login details by email

Poweradmin version

4.0.4

Database

MariaDB

Additional information (optional)

  • Debian 13
  • Poweradmin 4.0.4
  • PHP 8.4.11
  • Mail server: Stalwart and Postfix

Metadata

Metadata

Assignees

Labels

authAuthentication

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions