With OC v3.* the SMTP mail sending method didn’t work anymore for me. After some research and writing to my host support, I came up with following solution. The host support told me, that I need to add the local IP address of theirs:
In my .env file I added this line:
Then one should add this local domain to config/mail.php like this:
'smtp' => [ 'transport' => 'smtp', 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT', 587), 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, 'local_domain' => env('MAIL_EHLO_DOMAIN'), // this entry takes the local server domain from the .env ],
In my case the SMTP send mail option worked again with this solution.