Settings for Outlook 365 IMAP, SMTP, and POP3 Servers

Outlook365 allows you to connect to their IMAP (Internet Mail Access Protocol), POP3 (Post Office Protocol) and SMTP (Simple Mail Transfer Protocol) servers to manage, retrieve and send e-mail messages. In order to use their API, you need some information including hostname, port, username and password. You can find below configuration settings for using their APIs.

Office365

IMAP

  • IMAP Server / Incoming Mail: outlook.office365.com
  • Port: 993 (default), 143 (default)
  • IMAP Account / User: yourname@domain.onmicrosoft.com or yourname@your-domain.com
  • SSL Mode: Implicit or Explicit (Start TLS)

POP

  • POP Server / Incoming Mail: outlook.office365.com
  • Port: 995 (default), 110 (default)
  • POP Account: your ID followed by @outlook.office365.com or yourname@your-domain.com
  • SSL Mode: Implicit or Explicit (Start TLS)

SMTP

  • SMTP Server / Outgoing Mail: smtp.office365.com
  • Port: 587 (default)
  • SMTP Account: your ID followed by @outlook.office365.com or yourname@your-domain.com
  • SSL Mode: Explicit (Start TLS). Microsoft allows you to connect to their Office365 IMAP and POP3 servers using either Implicit or Explicit SSL mode. But the SMTP one does require you to use the Explicit SSL only.

Outlook.com, Hotmail.com, and Live.com

IMAP

  • Server: outlook.office365.com
  • Port: 993
  • Account: yourname@outlook.com or yourname@your-domain.com
  • SSL Mode: Implicit or Explicit (Encryption SSL/TLS)

POP

  • Server: outlook.office365.com
  • Port: 995
  • Account: yourname@outlook.com or yourname@your-domain.com
  • SSL Mode: Implicit or Explicit (Encryption SSL/TLS)

SMTP

  • Server: outlook.office365.com
  • Port: 587
  • Account: yourname@outlook.com or yourname@your-domain.com
  • SSL Mode: Explicit (Encryption STARTTLS)

The following example demonstrates how to connect to the Outlook365 SMTP server to send an email using Ultimate Mail library:

using ComponentPro.Net;
using ComponentPro.Net.Mail;

...

// Create a new instance of the Smtp class.
using (var client = new Smtp())
{
	// Connect to the server.
	client.Connect("outlook.office365.com", 587, SslSecurityMode.Explicit);

	// Login to the server.
	client.Authenticate("user", "password");

	// Create a new mail message.
	MailMessage msg = new MailMessage();
	msg.Subject = "Test Subject";
	msg.BodyText = "Content";
	msg.From = "from@mydomain.com";
	msg.To = "to@somedomain.com";

	// And send it.
	client.Send(msg);
}
// The connection is automatically closed here.

If you also want to connect to Yahoo mail servers, see this topic.

45-Day Money Back Guarantee

We will refund your full money in 45 days
if you are not satisfied with our products

Buy Now

Dont miss out Get update on new articles and other opportunities