update Updated January 2026 verified Verified

Outlook 365 SMTP Settings (2026)

Complete guide to configure Microsoft 365 and Outlook.com SMTP. Covers OAuth 2.0, App Passwords, SMTP AUTH settings, and code examples for all major languages.

table_chart Microsoft 365 SMTP Quick Reference

SMTP Server (Business) smtp.office365.com
SMTP Server (Personal) smtp-mail.outlook.com
Port 587 check_circle STARTTLS
Encryption TLS 1.2+ required (TLS 1.0/1.1 disabled)
Authentication OAuth 2.0 or App Password
Username Your full email address
Daily Limit 10,000 recipients/day
warning

Basic Auth Deprecation

Microsoft has deprecated Basic Authentication for SMTP. Use OAuth 2.0 for applications or App Passwords with 2FA enabled. SMTP AUTH must be explicitly enabled per mailbox.

account_circle Choose Your Account Type

Microsoft 365

Microsoft 365 Business

Exchange Online

check Server: smtp.office365.com
check 10,000 recipients/day
check OAuth 2.0 supported
check SMTP AUTH per mailbox
Setup Guide →
Outlook.com

Outlook.com / Hotmail

Personal accounts

check Server: smtp-mail.outlook.com
info ~300 emails/day limit
check App Password with 2FA
close OAuth requires app registration
Setup Guide →

business Microsoft 365 Business Setup

1

Enable SMTP AUTH for Mailbox

SMTP AUTH is disabled by default. Enable it via Admin Center or PowerShell:

Option A: Microsoft 365 Admin Center

  1. 1. Go to admin.microsoft.com
  2. 2. Navigate to Users > Active users
  3. 3. Select the user > Mail tab
  4. 4. Click 'Manage email apps'
  5. 5. Check 'Authenticated SMTP'

Option B: PowerShell

# Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

# Enable SMTP AUTH for specific mailbox
Set-CASMailbox -Identity "user@yourdomain.com" -SmtpClientAuthenticationDisabled $false

# Verify setting
Get-CASMailbox -Identity "user@yourdomain.com" | Format-List SmtpClientAuthenticationDisabled
2

Choose Authentication Method

security OAuth 2.0 Recommended

Modern authentication for applications. Requires Azure AD app registration.

  • + Most secure
  • + Token-based (no password)
  • - Complex setup

key App Password

Simple password for apps that don't support OAuth. Requires 2FA enabled.

  • + Easy setup
  • + Works with legacy apps
  • - Less secure
3

Configure SMTP Settings

dns
Server
smtp.office365.com
tag
Port
587
lock
Encryption
STARTTLS
person
Username
user@domain.com

person Outlook.com Personal Account Setup

info

For Outlook.com, Hotmail, and Live.com accounts, you need to enable 2FA and create an App Password.

  1. 1
    Enable Two-Factor Authentication

    Go to account.microsoft.com/security → Two-step verification

  2. 2
    Create App Password

    Go to Security settings → App passwords → Create a new app password

  3. 3
    Use These Settings
    Server: smtp-mail.outlook.com
    Port: 587
    Username: Your email
    Password: App password

code Code Examples

import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import os

# Microsoft 365 SMTP Configuration
# For personal: use smtp-mail.outlook.com
SMTP_SERVER = 'smtp.office365.com'
SMTP_PORT = 587
SMTP_USERNAME = os.environ.get('OUTLOOK_EMAIL')
SMTP_PASSWORD = os.environ.get('OUTLOOK_APP_PASSWORD')  # App Password, not account password

def send_email(to_email, subject, body):
    msg = MIMEMultipart('alternative')
    msg['From'] = SMTP_USERNAME
    msg['To'] = to_email
    msg['Subject'] = subject

    html_part = MIMEText(body, 'html')
    msg.attach(html_part)

    with smtplib.SMTP(SMTP_SERVER, SMTP_PORT) as server:
        server.starttls()  # Required for Office 365
        server.login(SMTP_USERNAME, SMTP_PASSWORD)
        server.send_message(msg)
        print('Email sent successfully!')

# Usage
send_email(
    'recipient@example.com',
    'Hello from Outlook',
    '<h1>Welcome!</h1><p>This is a test email.</p>'
)

speed Sending Limits

Limit Type Microsoft 365 Outlook.com
Recipients per day 10,000 ~300
External recipients/day 2,000 (ERR) ~300
Recipients per message 500 100
Message size 150 MB 20 MB
Messages per minute 30 Varies

ERR = External Recipient Rate. Limits may vary based on plan and tenant configuration.

build Troubleshooting Common Errors

help Frequently Asked Questions

What is the Microsoft 365 SMTP server address?

For Microsoft 365 Business: smtp.office365.com. For Outlook.com personal accounts: smtp-mail.outlook.com. Both use port 587 with STARTTLS.

Is Basic Authentication still supported?

Basic Authentication is being phased out. Microsoft requires OAuth 2.0 for new applications. For legacy apps, enable 2FA and use App Passwords. Check your tenant's Security Defaults settings.

Why does my From address need to match the authenticated user?

Microsoft 365 enforces strict sender verification to prevent spoofing. The From address must match the authenticated mailbox or be an alias/shared mailbox with Send As permission granted.

Can I use Outlook.com for bulk email?

No. Outlook.com has strict limits (~300 emails/day) and is intended for personal use only. For business or bulk email, use Microsoft 365 Business or a dedicated email service like SendGrid, Mailgun, or Amazon SES.

How do I send from a shared mailbox?

Grant Send As or Send on Behalf permission in Exchange Admin Center. Authenticate with your user credentials but set the From address to the shared mailbox address.

Need Higher Volume Email?

Microsoft 365 limits can be restrictive. Postigo integrates multiple SMTP providers for reliable high-volume sending.

rocket_launch Start Free Trial