Cannot connect with TSL/SSL
-
Trying to use a Cloudron mailbox for this.
Outgoing: I've tried using PHP mail() function as well as manually inserting the Mailgun SMTP details on all 3 ports with either SSL or TSL and nothing will send.
With PHP mail() selected it tells me to check the logs. This is there in the cloudron app logs but nothing else looks out of place:
sh: 1: /usr/sbin/sendmail: not found
And with Mailgun selected I get one of the following depending on which port and if SSL or TSL is selected
stream_socket_enable_crypto(): Peer certificate CN=`*.mailgun.org' did not match expected CN=`smtp.mailgun.com'
OR
Connection could not be established with host smtp.mailgun.com [ #0]
Doesn't feel like a Mailgun issue as I'm not having issues sending mail elsewhere. When I select Mailgun with no encryption, the test email is successful.
-
Have you checked the docs? Only SMTP works.
Can you post your SMTP configuration (maybe censoring personal details like domain names)?
-
@jordanurbs That looks an issue with the TLS implementation underpinning the
mail
function using peer matching that is too strict/dumb on the hostname. They're using a wildcard cert and for whatever reason PHP is balking at the*
wildcard and expecting that to literally be the hostname. This was a known bug in PHP like 7 years ago, but shouldn't be a contemporary problem. What version of PHP are you using? -
@jordanurbs If you are using a Cloudron mailbox, then you only need to put in Cloudron credentials and not mailgun credentials. Mailgun credentials (I assume for relay?) can be set in Email -> select domain -> outbound mail.
I have added screenshots for Cloudron email configuration in freescout here - https://docs.cloudron.io/apps/freescout/#cloudron-mailbox
-
@subven the docs say this:
For sending emails of a specific mailbox, the STMP method has to be selected as php mail() or sendmail wont work on Cloudron.
@jimcavoli the Cloudron default, looks like 7.3
@girish this took care of it. Thanks for adding that to the docs, makes everything much simpler
-
Yeah, I think I misinterpreted your question a little - glad you're all set though!