SMTP error on sending e-mail (DirectAdmin / Wordpress)

Sirrus

New member
Joined
Dec 7, 2021
Messages
1
Hi,

We're having issues sending e-mail via the Wordpress contact form. I'll try to give you as much information as possible.

Directadmin (version 1.63.3) is running on Ubuntu 18.04.6 LTS. The Ubuntu server is Hosted as a VM in Azure.

We tried troubleshooting the following:
  • Adding firewall exceptions in Azure
  • Checking ports on our SMTP host and client. 587 & 465 are open.
  • TCPdump from our SMTP host(Third Party) side: tells us they are not receving any smtp connection from our client at all.
  • Telnet to SMTP host. Telnet "SMTPHOSTNAME 587" gives a 220 answer. This works.
  • Creating new SMTP Host credentials.
  • Trying different SMTP authentication values (Ports,TLS, etc.)
  • Adding SMTP HOST address and port to PHP.ini PHPMAILER.php and SMTP.PHP
Likely outgoing SMTP is not working well. How can we further investigate this issue?

Shown below the error we get from Wordpress when testing our E-mail configuration:

Versions:
WordPress: 5.8.2
WordPress MS: No
PHP: 7.4.25
WP Mail SMTP: 3.2.1

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: smtp.flowmailer.net
Port: 587
SMTPSecure: tls
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.1.1 11 Sep 2018

Debug:
Email Source: WP Mail SMTP
Mailer: Andere SMTP-service
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

SMTP Debug:
2021-12-06 14:11:54 Connection: opening to smtp.flowmailer.net:587, timeout=300, options=array()

2021-12-06 14:11:58 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.flowmailer.net:587 (Connection refused) [/home/admin/domains/masterforce.nl/public_html/wp-includes/PHPMailer/SMTP.php line 388]

2021-12-06 14:11:58 SMTP ERROR: Failed to connect to server: Connection refused (111)

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
 
Last edited:
As I understand - you are connecting to remote smtp from WP scripts?
if you have CSF you must allow this DA user outgoing SMTP connections,
add username to SMTP_ALLOWUSER =
 
No need for the allower user setting, you would have to add every user. It might be easier to use this solution.
SMTP_BLOCK = "1"
SMTP_ALLOWLOCAL = "1"

These should normally be default
SMTP_ALLOWUSER = ""
SMTP_ALLOWGROUP = "mail,mailman"
and
SMTPAUTH_RESTRICT = "0"

and you should have no issues with any users, and you don't have to add every user to the allowuser setting.
 
Back
Top