Bug: Cannot send mail thru smtp.office365.com oauth2 from "115.2.3" Kubuntu
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2023-09-20 21:06:03+00:00
Resolved: 2023-10-01 16:10:02+00:00

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

Trying to send mail using

Server Name: 	smtp.office365.com
Port: 	587
User Name: 	<me>@hotmail.com
Authentication method: 	OAuth2
Connection Security: 	STARTTLS

Troubleshooting Information in attachment.
FYI:
- I can read e-mails, only the send with this account is broken.
- I can send with e.g. smtp.gmail.com+OAuth2.
- In the past (I cannot remember exact previous version of TB) sending worked fine.


Actual results:

Window similar to one related to OAuth2, but blank, is displayed for less than a second. Window "Sending Message" is displayed for long time, then replaced with "Send Message Error" with message "...the connection to Outgoing server (SMTP) smtp.office365.com timed out."

Inside Error Console I see:
uncaught exception: 2147500036
mailnews.smtp: 
- error { target: TCPSocket, isTrusted: true, name: "NetworkTimeoutError", message: "Network", errorCode: 2152398862, srcElement: TCPSocket, currentTarget: TCPSocket, eventPhase: 2, bubbles: false, cancelable: false, … }
​-- bubbles: false
​-- cancelBubble: false
​-- cancelable: false
​-- composed: false
​-- composedTarget: TCPSocket { host: "smtp.office365.com", port: 587, ssl: true, … }
​​--- binaryType: "arraybuffer"
​​--- bufferedAmount: 0
​​--- host: "smtp.office365.com"
​​--- onclose: function _onClose()
​​--- ondata: function _onData()
​​--- ondrain: function _onDrain()
​​--- onerror: function _onError()
​​--- onopen: function _onOpen()
​​--- ownerGlobal: null
​​--- port: 587
​​--- readyState: "closed"
​​--- ssl: true
​​--- transport: XPCWrappedNative_NoHelper {  }
​​--- <prototype>: TCPSocketPrototype { upgradeToSecure: upgradeToSecure(), suspend: suspend(), resume: resume(), … }
​--- currentTarget: null
​--- defaultPrevented: false
​--- defaultPreventedByChrome: false
​--- defaultPreventedByContent: false
​--- errorCode: 2152398862
​--- eventPhase: 0
​-- explicitOriginalTarget: TCPSocket { host: "smtp.office365.com", port: 587, ssl: true, … }
​​--- binaryType: "arraybuffer"
​​--- bufferedAmount: 0
​​--- host: "smtp.office365.com"
​​--- onclose: function _onClose()
​​--- ondata: function _onData()
​​--- ondrain: function _onDrain()
​​--- onerror: function _onError()
​​--- onopen: function _onOpen()
​​--- ownerGlobal: null
​​--- port: 587
​​--- readyState: "closed"
​​--- ssl: true
​​--- transport: XPCWrappedNative_NoHelper {  }
​​--- <prototype>: TCPSocketPrototype { upgradeToSecure: upgradeToSecure(), suspend: suspend(), resume: resume(), … }
​--- isReplyEventFromRemoteContent: false
​--- isSynthesized: false
​--- isTrusted: true
​--- isWaitingReplyFromRemoteContent: false
​--- message: "Network"
​--- multipleActionsPrevented: false
​--- name: "NetworkTimeoutError"
​-- originalTarget: TCPSocket { host: "smtp.office365.com", port: 587, ssl: true, … }
​​--- binaryType: "arraybuffer"
​​--- bufferedAmount: 0
​​--- host: "smtp.office365.com"
​​--- onclose: function _onClose()
​​--- ondata: function _onData()
​​--- ondrain: function _onDrain()
​​--- onerror: function _onError()
​​--- onopen: function _onOpen()
​​--- ownerGlobal: null
​​--- port: 587
​​--- readyState: "closed"
​​--- ssl: true
​​--- transport: XPCWrappedNative_NoHelper {  }
​​--- <prototype>: TCPSocketPrototype { upgradeToSecure: upgradeToSecure(), suspend: suspend(), resume: resume(), … }
​--- returnValue: true
​-- srcElement: TCPSocket { host: "smtp.office365.com", port: 587, ssl: true, … }
​​--- binaryType: "arraybuffer"
​​--- bufferedAmount: 0
​​--- host: "smtp.office365.com"
​​--- onclose: function _onClose()
​​--- ondata: function _onData()
​​--- ondrain: function _onDrain()
​​--- onerror: function _onError()
​​--- onopen: function _onOpen()
​​--- ownerGlobal: null
​​--- port: 587
​​--- readyState: "closed"
​​--- ssl: true
​​--- transport: XPCWrappedNative_NoHelper {  }
​​--- <prototype>: TCPSocketPrototype { upgradeToSecure: upgradeToSecure(), suspend: suspend(), resume: resume(), … }
​-- target: TCPSocket { host: "smtp.office365.com", port: 587, ssl: true, … }
​​--- binaryType: "arraybuffer"
​​--- bufferedAmount: 0
​​--- host: "smtp.office365.com"
​​--- onclose: function _onClose()
​​--- ondata: function _onData()
​​--- ondrain: function _onDrain()
​​--- onerror: function _onError()
​​--- onopen: function _onOpen()
​​--- ownerGlobal: null
​​--- port: 587
​​--- readyState: "closed"
​​--- ssl: true
​​--- transport: XPCWrappedNative_NoHelper {  }
​​--- <prototype>: TCPSocketPrototype { upgradeToSecure: upgradeToSecure(), suspend: suspend(), resume: resume(), … }
--- timeStamp: 0
​--- type: "error"
​-- <get isTrusted()>: function isTrusted()
​-- <prototype>: TCPSocketErrorEventPrototype { name: Getter, message: Getter, errorCode: Getter, … }
  SmtpClient.jsm:442:17
    _onError resource:///modules/SmtpClient.jsm:442

mailnews.send: Sending failed; The message could not be sent because the connection to Outgoing server (SMTP) smtp.office365.com timed out. Try again., exitCode=2153066800, originalMsgURI= MessageSend.jsm:361:32
    fail resource:///modules/MessageSend.jsm:361
    _deliveryExitProcessing resource:///modules/MessageSend.jsm:710
    sendDeliveryCallback resource:///modules/MessageSend.jsm:764
    OnStopRunningUrl resource:///modules/MessageSend.jsm:1429
    onerror resource:///modules/SmtpService.jsm:195
    _onError resource:///modules/SmtpClient.jsm:459



Expected results:

Mail sent