# Office 365 >  >  Office 365 SMTP Relay and CDO

## vikas.bhandari

Hello All,

I have been looking over the internet for a long time now and couldn't find a solution.

I am using CDO for sending emails without outlook from VBA. It was working fine until I bought Office365 Subscription. This is what I am using:




```
Please Login or Register  to view this content.
```



It has started giving me Cannot Connect to Server Error. It is coming after I moved my email services to office 365.

My initial thought is, Office 365 SMTP Relay uses TLS Encryption, and CDO doesn't TLS Encryption. I saw every possible thread online but couldn't find the answer. If anyone has used Office 365 SMTP server with CDO, please share the feedback. It would be really helpful for me. 

FYI, Outlook can send emails though, using TLS Ofcourse.

Thanks,
V

----------

