Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Office 365 and sending email

Hi Team

Can someone help 

For the life of me i cannot get office 365 smtp to work with OS

I have added the correct smtp detail and gave a licence mailbox for the account but nothing

It fetch email fine but when i try to enable smtp i get this error... the ticketing is hosted at godaddy webserver

Sending Email via SMTP     
Failed to connect to [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]
Port Number   
Authentication Required     
Header Spoofing 


  • edited May 2017
    Why not port 465? It says connection refused Firewall issue / Bad Username/password issue? 

    Edited: I noticed the fetching works. Test using different port and let us know. 

    Also, not sure if you read this, but please do and post more details about your environment. 

    Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you. 

  • Hi Mate

    same issue ... it is not username/pw because fetching working

    what other info maybe relevant for you....

    the reason why i want to relay via office 365 is because our relay via goddady stop working

    users are not getting our emails nor ticket alerts however if i go to the admin area and manually test the email works fine

    Sending Email via SMTP     
    Failed to connect to [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]

  • Please read what I posted in the hyperlink, you need to provide us more of your environment details in order to get better help.

    You posted in v1.10, so I am guessing that's your OSTicket version?
    - What is your SQL software and version
    - What is your web host software and version
    - What is your PHP version? 
  • Server Information
    osTicket Version v1.10 (901e5ea) — Up to date
    Web Server Software Apache/2.4.25
    MySQL Version 5.6.35
    PHP Version 5.6.30
  • Have you checked your firewall settings to make sure the port is not blocked?
  • i will call godaddy to check
  • Godaddy use these ports for their own relay....

    He said my best bet is to use they own relay 
  • Synt4xError godaddy was blocking out email from relaying also it is not possible to use office 365 ports on the outgoing with godaddy as these are already in use
  • That's very unfortunate, I am sorry to hear that. They couldn't offer any alternative? I personally steered away from GoDaddy because of limitations such as this. 
  • edited July 2017
    I know this thread is a bit old but I have found a solution to my issue which is about the same as all of the above.  I had searched for days trying to find an answer.  I could not connect to office365 from my webhost.  It wasn't that anyone was blocking the ports.   

    It has to do with PHP 5.6.  It has built in security that doesn't allow you to basically send from one system to another insecurely.  What you have to do is install a security certificate on your webspace/domain.  I was just able to use a free "Lets Encrypt" certificate.  Once installed, PHP 5.6 was happy and was then able to send email out through office365.  The cpanel on my host has the ability to install a "Lets Encrypt" certificate automatically from cpanel under the security section and that did the trick.

    Once you have all of the DNS entries that office365 wants you to enter to send email from your domain through them, do this...

    After security certificate is installed (described above), for osticket under "sending email via SMTP" , use your domain name as the email server name, port 587, authentication required = no.

    The lack of a security certificate was the main big issue that was causing PHP5.6 to abort the connection to the office365 server.
Sign In or Register to comment.