Outlook 365 supports access via IMAP, POP3 and SMTP protocols. Below you can find the configuration settings for all protocols.
On the main screen go to “Options” / “See All Options…”:
Now click the “Settings for POP, IMAP, and SMTP access…” link:
You can find POP, SMTP and IMAP server addresses and settings on the popup window:
Office365 uses default ports for IMAP, POP3 and SMTP protocols. That means that you don’t need to remember port numbers, as Mail.dll .NET email component is going to use correct port numbers by default.
IMAP
Server: podXXXX.outlook.com
SSL: true, implicit
Port: 993 (default)
User: pat@domain.onmicrosoft.com
POP3
Server: podXXXX.outlook.com
SSL: true, implicit
Port: 995 (default)
User: pat@domain.onmicrosoft.com
SMTP
Server: podXXXX.outlook.com
SSL: true, explicit
Port: 587 (default)
User: pat@domain.onmicrosoft.com
IMAP and POP3 servers use implicit SSL – use ConnectSSL method. SMTP server requires explicit SSL – use Connect and StartTLS method.
// C# using (Imap client = new Imap()) { client.ConnectSSL("podXXXX.outlook.com"); client.UseBestLogin("user@domain.onmicrosoft.com", "password"); ... } using (Pop3 client = new Pop3()) { client.ConnectSSL("podXXXX.outlook.com"); client.UseBestLogin("user@domain.onmicrosoft.com", "password"); ... } using (Smtp client = new Smtp ()) { client.Connect("podXXXX.outlook.com"); client.StartTLS(); client.UseBestLogin("user@domain.onmicrosoft.com", "password"); ... }
' VB.NET Using client As New Imap() client.ConnectSSL("podXXXX.outlook.com") client.UseBestLogin("user@domain.onmicrosoft.com", "password") ... End Using Using client As New Pop3() client.ConnectSSL("podXXXX.outlook.com") client.UseBestLogin("user@domain.onmicrosoft.com", "password") ... End Using Using client As New Smtp() client.Connect("podXXXX.outlook.com") client.StartTLS() client.UseBestLogin("user@domain.onmicrosoft.com", "password") ... End Using
You can find more details about using implicit and explicit SSL or TLS with email protocols: