[GH-ISSUE #1] Trying to send to Office365 throws TLS error #2

Closed
opened 2026-02-26 18:32:55 +03:00 by kerem · 3 comments
Owner

Originally created by @shaxraman on GitHub (May 14, 2020).
Original GitHub issue: https://github.com/decke/smtprelay/issues/1

Hi

Looks like a great utility, exactly what I was looking for, but I ran into a snag trying to send email to Office365:

Config file:

remote_host = smtp.office365.com: 587

2020/05/14 13:47:41 delivering using smarthost smtp.office365.com:587 2020/05/14 13:47:52 delivery failed: 504 5.7.4 Unrecognized authentication type [HE1PR0401CA0078.eurprd04.prod.outlook.com]

Am using an application password for the authentication, but also tried with a non-MFA account - same error.

Originally created by @shaxraman on GitHub (May 14, 2020). Original GitHub issue: https://github.com/decke/smtprelay/issues/1 Hi Looks like a great utility, exactly what I was looking for, but I ran into a snag trying to send email to Office365: Config file: remote_host = smtp.office365.com: 587 `2020/05/14 13:47:41 delivering using smarthost smtp.office365.com:587 2020/05/14 13:47:52 delivery failed: 504 5.7.4 Unrecognized authentication type [HE1PR0401CA0078.eurprd04.prod.outlook.com]` Am using an application password for the authentication, but also tried with a non-MFA account - same error.
kerem closed this issue 2026-02-26 18:32:55 +03:00
Author
Owner

@grffio commented on GitHub (May 14, 2020):

You need to use the Login auth mechanism, the solution is described here.
You can add the configuration flag LoginAuthType: false/true, and check it, depending on the flag use Login or Plain auth mechanism.

<!-- gh-comment-id:628742693 --> @grffio commented on GitHub (May 14, 2020): You need to use the `Login` auth mechanism, the solution is described [here](https://gist.github.com/andelf/5118732). You can add the configuration flag `LoginAuthType: false/true`, and check it, depending on the flag use `Login` or `Plain` [auth mechanism](https://github.com/decke/smtprelay/blob/2afbe674073123b7177df61d2c3475ceb1007879/main.go#L113).
Author
Owner

@decke commented on GitHub (May 15, 2020):

I will have a look at it. Looks like it should be easy to fix.

<!-- gh-comment-id:629064248 --> @decke commented on GitHub (May 15, 2020): I will have a look at it. Looks like it should be easy to fix.
Author
Owner

@decke commented on GitHub (May 15, 2020):

Should be working now. You will need to set remote_auth = login in your smtprelay.ini to test it.

<!-- gh-comment-id:629488886 --> @decke commented on GitHub (May 15, 2020): Should be working now. You will need to set remote_auth = login in your smtprelay.ini to test it.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/smtprelay#2
No description provided.