Office365 connection wordpress smtp


  • Hello,

    I have read your blog for setting up smtp with office365 here:

    But its giving me this error, I am unable to find any solution for this issue. 

    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed.
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)

    OpenSSL: Yes
    SMTP Debug:
    2018-02-07 10:53:56 Connection: opening to, timeout=300, options=array ( ) 2018-02-07 10:54:05 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to (Connection refused) 2018-02-07 10:54:05 SMTP ERROR: Failed to connect to server: Connection refused (111) 2018-02-07 10:54:05 SMTP connect() failed.

    Wednesday, February 7, 2018 11:21 AM