Site icon Mailtrap

Outlook SMTP Explained: Setting Up, Configuration & Debugging Tutorial

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

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:

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:

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:

Step 2. Generate an app-specific password

Now, let’s generate an app password:

Step 3. Insert the necessary Outlook SMTP settings

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

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:

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:

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

Step 2. Insert the necessary POP information

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

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:

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:

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.

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:

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.

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.

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.

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.

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.

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.

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:

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:

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!

Exit mobile version