i'm using mageplaza's SMTP extension for magento 2.


I have configured the smtp with smtp.office365.com and when sending the test email it is giving following error.

Could not open socket: stream_socket_client(): unable to connect to tcp://smtp.office365.com:587 (Permission denied)

So is this issue on server settings or in magento side ? Also i have setup the linux server for the magento installation. Do need to install configure the SMTP for this server also ?

  • Have you tried gmail SMTP to see if it is working correctly to send email – Raj Mohan R Jul 1 at 11:23
  • stream_socket_client() is used for: Open Internet or Unix domain socket connection The error seems connected to Network Layer, please try to run: traceroute smtp.office365.com to check where the connection gets terminated (Outgoing Firewall Rules @ Your Server might be blocking the Data Flow to smtp.office365.com) – Piotr Siejczuk Jul 1 at 11:51
  • Add your admin configuration image here – Ravi Soni Jul 1 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.