Issue with Invalid Outgoing Mail Server or Port in ERPNext

When I try to create an email account and login using the official email server or email outlook, hotmail, I receive the error message "Invalid Outgoing mail Server or Port.’ .
I have verified that all the provided data is correct. For instance, the Outlook settings are as follows: the incoming server is outlook.office365.com, the outgoing server is smtp.office365.com. Despite my attempts to resolve the issue using various methods, none of them have been successful.

I’m open to any suggestions, advice, or troubleshooting steps that might lead to the resolution of this problem.

Thank you for taking the time to read this post, and I eagerly await your responses.

Hi:

According to the Microsoft documentation …smtp server would be smtp-mail.outlook.com

I tried using the server smtp-mail.outlook.com , but it did not work. I followed the documentation, but I was not successful.

@CodeAhmed01

Probably related to your hostname or FQDN … could you check whats your hostname? Please, try hostname and hostname -f in your console.