Outlook SMTP Explained: Setting Up, Configuration & Debugging Tutorial

On March 25, 2024
11min read
Ivan Djuric, an author at Mailtrap
Ivan Djuric Technical Content Writer @Mailtrap

In this tutorial, I’ll explain what Outlook SMTP is, how you can set up Outlook SMTP, including practical examples, describe its use cases and limitations, and tell you about Mailtrap, a reliable alternative with high email-sending capabilities.

What is an Outlook SMTP server?

SMTP, short for Simple Mail Transfer Protocol, is an internet standard protocol responsible for email sending. It operates through a series of commands to define how the messages get from the sender to the email server and can relay emails between servers and clients.

Outlook SMTP, on the other hand, is the protocol provided by Microsoft for its email service Outlook.com (formerly Hotmail) to send emails. But, you can also use it to send emails through your application or email client (e.g., Mozilla Thunderbird, Yahoo Mail, Mac Mail etc.).

Outlook SMTP is also free to use, and it’s important not to confuse it with Office 365 SMTP, which is a paid option also offered by Microsoft that offers additional features and higher sending limits.

Outlook SMTP ports

  • Port 587 (recommended) – As it’s used with STARTTLS encryption, port 587 is the standard port for sending messages through Outlook SMTP as it ensures your emails can’t be read or intercepted by unauthorized parties during transmission.
  • Port 25 (alternative) – Because it doesn’t inherently support encryption, port 25 is susceptible to interception and is blocked by many ISPs and cloud service providers to reduce spam. It’s typically used for SMTP relay within controlled environments (e.g., internal networks where messages are relayed between servers).

If you want to learn more about different SMTP ports, read our article on the topic, or watch the video we’ve prepared for you.

What Outlook SMTP is used for

Outlook’s SMTP server has various functionalities, which can help you:

  • Send transactional emails – Outlook SMTP is great for sending a modest amount of personalized transactional emails, such as purchase confirmations, password resets, and others.
  • Implement automated notifications – You can leverage Outlook’s SMTP server to send automated notifications that inform your users of updates, reminders, or other specifics related to your application.
  • Send emails from different clients with Outlook address – Whether you’re using a mail application such as Thunderbird or Yahoo Mail, you can configure it to send emails as if you’re using Outlook directly. 
  • Add email-sending functionality to custom apps – If you want to use your company email address for outgoing messages from your application (for branding or authentication purposes), you can configure it to dispatch messages via Outlook’s SMTP server.

Why should you use Outlook as an SMTP server?

Whether you’re a developer or a product manager, familiarizing yourself with Outlook’s SMTP server advantages can go a long way before you settle on it.  

Here’s a breakdown of some Outlook SMTP benefits by Yaroslav, our email deliverability expert:

  • Easy to set up – As you’ll see a bit later in the article, Outlook SMTP is quite straightforward to set up. As you only need to copy and paste its credentials into your email client or application configuration.
  • Microsoft services integration – If you use Outlook SMTP, you can seamlessly sync your email operations with other Microsoft services, such as Microsoft Outlook 365, SharePoint, and OneDrive.
  • Secure email sending – Although it doesn’t require Secure Password Authentication, Outlook supports STARTTLS, which means your email communication will be secured through an encrypted connection, which safeguards sensitive information from being intercepted during transmission.
  • Reliable infrastructure – Microsoft has a reliable infrastructure that guarantees high reliability and uptime for your email services. If you don’t go over the sending limits, your emails should face a minimal risk of being missed or delayed.
  • Wide compatibility – Outlook SMTP is quite flexible as it is compatible with most email programs and software development kits (SDKs). 
  • Developer-friendly – Although there is no extensive documentation for integrating your application with Outlook SMTP (if you don’t count this support page as extensive documentation), developers can find plenty of helpful information on the Microsoft Tech Community forums.

Keep in mind that although it’s a viable, free-to-use option with various benefits, especially for individual users and smaller-scale applications, Outlook has its limitations, which I’ll go over in the section below.

How to configure Outlook SMTP server settings?

Now that we have our foundations laid down, let me show you how to configure it so you can send emails through Outlook SMTP from your web application or various email clients.

Step 1. Enable two-step verification

First things first, we need to enable two-step verification, without which we can’t generate an ‘App password’ that’s required for Outlook SMTP.

Here’s how to do it:

  • Sign in with your account at Microsoft Security Page
  • Select ‘Advanced security options’ or ‘Two-step verification’
  • Click on ‘Turn on’ under ‘Two-step verification’ in the ‘Additional security’ section
  • Verify your identity via an app, alternate email address, or a phone number

Step 2. Generate an app-specific password

Now, let’s generate an app password:

  • Note down the generated App password as you won’t see it again when you leave or close the page.
    • Tip: If you ever lose one, don’t worry—you can generate as many App passwords as you want and replace the lost one.

Step 3. Insert the necessary Outlook SMTP settings

To send emails through Outlook SMTP, input the following settings into your app or email client: 

  • SMTP server name: smtp-mail.outlook.com
  • SMTP port: 587 
  • SMTP encryption: STARTTLS
  • Username: Your full Outlook email address (e.g., john.doe@hotmail.com or jane.doe@live.com)
  • Password: The App password you generated earlier

Configuration examples

For demonstrative purposes, in the following section, I’ll show you specific examples of setting up Outlook SMTP in WordPress, Python, and Thunderbird.

WordPress Outlook SMTP configuration

When it comes to WordPress, you can use a plugin such as WP Mail SMTP or Post SMTP to configure the Microsoft Outlook SMTP server. In this example, I’ll use WP Mail SMTP.

Here’s how you can do it:

  • Log in to your WordPress account
  • Install the WP Mail SMTP plugin from the dashboard
  • Go to WP Mail SMTPSettings
  • Select ‘Other SMTP’ as the mailer
  • Enter the Outlook SMTP settings

Python Outlook SMTP configuration

If you are working on a Python-based application, here’s how you would modify a code snippet with Outlook SMTP credentials to send a plain-text email:

import smtplib
from email.mime.text import MIMEText

subject = "Email Subject"
body = "This is the body of the text message"
sender = "sender@hotmail.com"  # Your Outlook email address
recipients = ["recipient1@gmail.com", "recipient2@gmail.com"]  # Recipient email addresses
password = "password"  # Your app-specific password

def send_email(subject, body, sender, recipients, password):
    msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = sender
    msg['To'] = ', '.join(recipients)
    with smtplib.SMTP('smtp-mail.outlook.com', 587) as smtp_server:
        smtp_server.ehlo()  # Can be omitted
        smtp_server.starttls()  # Secure the connection
        smtp_server.ehlo()  # Can be omitted
        smtp_server.login(sender, password)
        smtp_server.sendmail(sender, recipients, msg.as_string())
    print("Message sent!")

send_email(subject, body, sender, recipients, password)

Thunderbird Outlook SMTP configuration 

To configure Thunderbird to send emails via Outlook’s SMTP server, follow these steps:

  • Launch the Thunderbird email client
  • Click on ‘Account Settings’ in the upper-right corner of the window
  • Select ‘Outgoing Server (SMTP)’ at the bottom of the drop-down menu
  • Enter the Outlook SMTP settings

I used Thunderbird version 115.0 in this example, so your access to ‘Account Settings’ might slightly vary if you’re using an older version of Thunderbird

How to configure Outlook POP3 settings?

Now that you know how to send emails with Outlook SMTP, it’s time to configure a retrieval internet protocol for fetching messages, Post Office Protocol 3, or simply POP3.

POP3 allows you to download emails from your Outlook account to your local computer or device over a TCP/IP connection. With POP3, you can view your messages offline once you download them, which can be useful if you don’t have a constant internet connection or if you want to back up your emails locally.

Step 1. Enable POP access in Outlook settings

  • Sign in to Outlook.com with your Microsoft account
  • Click on the gear icon in the upper-right corner of the page to open Settings
  • Select ‘Sync email’ under the ‘Mail’ section
  • Tick the ‘Let devices and apps use POP’ option
  • Click ‘Save’ to save your settings before exiting

Step 2. Insert the necessary POP information

Insert the following POP settings into your app or email client to configure POP3:

  • POP server: outlook.office365.com
  • POP port: 995
  • Encryption method: TLS
  • Username: Your full Outlook email address (e.g., john.doe@hotmail.com)
  • Password: The App password you generated earlier

How to configure Outlook IMAP settings?

IMAP, or Internet Message Access Protocol, is another protocol for retrieving emails, which you can use if POP3 isn’t up your alley.

Namely, contrary to POP3, which downloads your messages from the server to a local device, IMAP synchronizes your emails across all of your devices. Essentially, it stores your messages on the email server, where you can manage your inbox or download copies of your emails.

This provides you with more control over your inbox and gives you more flexibility as you can access and organize your emails from any device.

Configuring Outlook IMAP settings

As Outlook uses IMAP by default, you don’t have to enable it in the email settings. Instead, you just need the following IMAP account information:

  • IMAP server name: outlook.office365.com
  • IMAP port: 993
  • Encryption method: TLS
  • Username: Your full Outlook email address (e.g., john.doe@hotmail.com)
  • Password: The App password you generated earlier

POP3 vs IMAP – when to use each protocol

When it comes to POP3 and IMAP, there is no definite answer as to which protocol is better for your incoming mail server as it depends on your personal needs and requirements. 

Again, I consulted our deliverability expert Yaroslav, and here’s what he has to say:

  • POP3

Use POP3 if you prefer to store your emails on your local device for security reasons or if your internet connection is limited and you have to download your emails. 

POP3 is also useful if you want to fetch your email messages on a single device for convenience or if you expect to receive a large number of emails and have limited cloud storage.

  • IMAP

Use IMAP if you prefer cloud email and plan to sync your messages across different devices (e.g., your laptop, mobile phone, etc.) or if you want to have a backup in the cloud to prevent headache-inducing issues such as data loss. 🤕

You should also go with IMAP if you have a stable internet connection and can access your email account at all times. 

Lastly, IMAP is a more obvious choice if you have more than enough space on a server for storing emails without having to delete some (or you’re okay with deleting some emails from time to time).

Troubleshooting common Outlook SMTP server errors

Some of the most common Outlook SMTP-related errors I found on Stack Overflow and other community forums include:

  • #5.5.0 smtp;553 sorry, that domain isn’t in my list of allowed rcpthosts (#5.7.1)

If you’re getting this error message, it means your recipient’s mail server is blocking incoming mail from you, in which case you have to contact the recipient or send new emails using a different outgoing mail server.

  • 553 5.7.1 Sender address rejected: not owned by user

This error message means that there’s a mistake within your SMTP server settings. To fix it, simply double-check your configuration or try sending the message from another email account.

  • Task – Sending reported error (0x80042109): Outlook cannot connect to your outgoing (SMTP) e-mail server.

If you’re seeing this lengthy error message, the chances are that there might either be a port number typo in Outlook SMTP settings or that your firewall or antivirus is blocking your message. In that case, simply try to disable the firewall and antivirus temporarily and see whether the message is finally going through.

  • Error 0x800CCC0F

Similar to the previous error message, this one might be showing up because antivirus scanners are blocking Outlook SMTP. To fix it, try disabling email scanning or increasing the timeout setting in your antivirus software. And remember to ensure your firewall is letting the antivirus scanner connect to the Internet.

  • Error 0x800CCC7D

You’re likely getting this error message if you had gone with the alternative, port number 25, in your SMTP configuration. Namely, port number 25 works with SSL (Secure Sockets Layer), and this error is basically saying that it’s an SSL error. To fix it, simply change to the more secure port 587 and use STARTTLS.

  • Error 0x800CCC78

This is one of the more common typo errors, with the root of the problem being in the ‘From’ field. To fix it, check your address for often overlooked typos like double spaces, wrongly capitalized letters, etc.

  • Error 0x80040119, or “Unknown error” (814441)

This message is not strictly tied to ‘sending errors,’ as it can happen when you try to read, receive, or even delete emails in Outlook. To fix it, all you have to do is disable the application or email client that has access to Outlook’s data, reboot your computer, and try enabling it again.

In case the error persists, try repairing the Outlook data file (PST or OST) with the Inbox Repair Tool (SCANPST.exe) or check for potential issues with Outlook add-ins.

Outlook SMTP limitations — when not to use Microsoft Outlook as a SMTP server

As I’ve said earlier in the article, Outlook SMTP has certain limitations that might not make it ideal for everyone. 

More specifically, they include:

  • Sending limits – Designed to prevent spam, Microsoft has a daily sending limit of 300 emails per day in place. Moreover, you can send each email to a maximum of 100 recipients. If you go over these limits, you risk your email getting blocked and flagged as spam.
  • Not ideal for bulk emailing – If you consider the sending limits, you’ll likely realize that Outlook SMTP is not the best choice for sending email campaigns like newsletters or promotional messages to a large number of recipients. 
  • Attachment size limit – The maximum size of attachments you can send with Outlook SMTP is 25 MB. The only way to share a larger file would be to use OneDrive, which has a limit of 2 GB.
  • No technical support – Although its paid variant, Microsoft Office 365, offers customer support, the free Outlook SMTP service doesn’t, so you’ll have to rely on community forums for solving error messages, or, of course, this article. 🛠️🙂
  • Lack of advanced features – Compared to some SMTP service providers, like Mailtrap for example, Outlook offers quite a limited functionality. Delivery reports, spam reports, and other critical data is not available with Outlook SMTP.
  • Poor customization and integration – Even though it’s quite easy to configure and set up, Outlook SMTP only has basic email-sending capabilities. This means that it’s not the best choice if you want to integrate with a CRM system, customize email headers, implement certain security protocols, and so on.
  • Compliance and security requirements – Unfortunately, Outlook SMTP doesn’t meet certain compliance and security requirements like GDPR for example. If you’re looking for a more tailored, security-compliant SMTP service, you might want to look into other email providers.

Outlook SMTP alternative — Mailtrap SMTP

If you can’t look past Outlook SMTP limitations, let me introduce you to Mailtrap, an Email Delivery Platform that offers an SMTP service, designed for delivering your emails just in time.

Unlike Outlook’s SMTP, Mailtrap SMTP service provides you with in-depth analytics and helicopter-view dashboards. These include bounce rates, open rates, click-through rates, and many other important stats you need to fine-tune your email infrastructure.

Moreover, with Mailtrap, you can send marketing or promotional emails to a large number of recipients at once with the specialized Bulk Stream.

And you don’t have to worry about security, as Mailtrap is fully compliant with GDPR and follows secure email-sending practices, such as TLS/SSL encryption.

You also get dedicated IPs, auto IP warmups, suppression lists, and other features that help you improve your email deliverability.

Speaking of email deliverability, testing emails is an inseparable part of email sending and the industry’s best practice. Especially when it comes to HTML emails as you want them to render properly without losing your clients along the way. 

Luckily, Mailtrap Email Testing does the job. It’s part of the Mailtrap Email Delivery Platform and allows you to check your spam score, inspect and verify your HTML/CSS to ensure your code is flawless before it reaches your recipients’ inboxes, and more.

Essentially, Mailtrap Email Delivery Platform allows you to test, send, and control your email infrastructure all in one place.

Here’s how it works:

  • Verify your domain by adding the DNS records provided by Mailtrap to your Domain provider’s DNS.
  • Once your domain is verified, go to the SMTP/API Settings tab, located under Sending Domains, and choose your preferred SMTP stream.
  • Use the SMTP settings provided by Mailtrap to integrate the functionality within your application or email client.
  • Verify that everything is configured correctly by sending a test email.

Wrapping up

Now, whether you choose Outlook SMTP server or not is up to you. If you don’t mind its limitations and can live with the lack of features it offers, then you know the answer. 

On the other hand, Mailtrap is a more reliable and versatile solution if you’re looking to add email-sending functionality to your application.

Regardless of your decision, thank you for reading and happy email sending!

Ivan Djuric, an author at Mailtrap
Article by Ivan Djuric Technical Content Writer @Mailtrap

I’m a Technical Content Writer with 5 years of background covering email-related topics in tight collaboration with software engineers and email marketers. I just love to research and share actionable insights with you about email sending, testing, deliverability improvements, and more. Happy to be your guide in the world of emails!