I recently bought a domain with an Office365 account here on GoDaddy. I have a website hosted on DigitalOcean to which the domain points. The website is built with Laravel and before subscribing to Office365 I used a gmail account for mailing the users and it was working fine, now I'm trying to switch to my new Office365 account but with no success.
but I'm not able to send any email and I'm getting this error
Expected response code 250 but got code "550", with message "550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653
Could any of you point me in the right direction to solve this ?
What you described doing isn't something that Office 365 supports. It's only meant to be used to send emails from your email account or your personal email client, not a hosting server. If you are wanting to send email from your hosted site, I suggest contacting your hosting provider for suggestions.
Based on the information from the link in the error message you received, the IP (your hosting provider) is blocked from sending emails through Office 365.