Implemented Email transport method: encryption: STARTTLS

maksumic

New member
Hi,
I need the option to choose the STARTTLS encryption protocol in the email transport method.
Using the "PHP built-in mail system" does not work either.

It's for Office 365:
smtp.office365.com port 587
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.

maksumic

New member
Are you sure? It doesn't work (no error messages.)

But, it works with a simple python script:
Code:
message = ...
session = smtplib.SMTP("smtp.office365.com", 587)
session.ehlo()
session.starttls()
session.login("xxxx@xxxx.com", "xxxx")
session.sendmail("xxxx@xxxx.com", recipient, message.as_string())
session.quit()

The "Contact us" form doesn't send anything to my inbox either.

Edit got an error message now:
Code:
Swift_TransportException: Email to xxxx@xxxx.com failed: Connection could not be established with host smtp.office365.com :stream_socket_client(): unable to connect to tcp://smtp.office365.com:587 (Connection refused)
 
Last edited:

Mike

XenForo developer
Staff member
Seeing your edit, that error is well before the TLS component -- it's a network-stack-level error suggesting the connection was refused. You may need to look at your firewall/security settings for example (note that they may differ depending on the Linux user that's triggering the action). This can include SELinux settings, for example.

(For further questions, it might be best to create a new troubleshooting thread, though this particular error generally indicates something outside of XF's control.)
 
Top