Years of mail, on your own disk.

Tips › Accounts

Microsoft 365 refuses to send with 5.7.139 — send your mail anyway

5 October 2026 · searched as 535 5.7.139 authentication unsuccessful

Most companies on Microsoft 365 have SMTP AUTH switched off — the way most mail apps send. Mail still arrives, but every send comes back 535 5.7.139, and signing in again changes nothing, because nothing is wrong with the sign-in. MailCode can send through Microsoft Graph instead, which that switch does not touch: one permission, and in most companies no administrator.

How to do it

  1. Add the account with Add Account ▸ Microsoft 365 / Outlook.com and 🔑 Sign in with Microsoft. An account added under IMAP / SMTP with a password cannot use Graph — remove it and add it this way.
  2. Open Settings ▸ Accounts. The account’s card has a Sending row that reads SMTP — off by default on Microsoft tenants. Click 🔑 Use Graph.
  3. Microsoft asks whether MailCode may send mail as you. Accept, and the row reads Microsoft Graph: every message from this account goes that way, scheduled ones included.
  4. Skipped the setting? Just send. When Microsoft refuses, MailCode keeps the message in the Outbox and offers to grant the permission there and then — say OK and it goes out.
MailCode: The Sending row on a Microsoft 365 account, one click from Microsoft Graph.
The Sending row on a Microsoft 365 account, one click from Microsoft Graph.

If Microsoft answers that an administrator has to approve, your company does not let people grant apps permissions themselves; that is the one case that needs IT. Graph takes a message of up to 4 MB, so MailCode offers to send larger files as a link. Microsoft files the copy in Sent Items itself. A mailbox added as Exchange server (EWS) sends through Exchange and never meets this error.

MailCode is a mail client for Mac and Windows that keeps your mail in a searchable archive on your own disk. Free for 14 days.

Mac App Store Download for Windows
© 2026 MailCode. Made in Ankara. MailCode Releases Support Privacy Terms Disclaimer Contact