Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendWithStartTLS:504 5.7.4 Unrecognized authentication type [HK2PR04CA0063.apcprd04.prod.outlook.com] #151

Open
agoraluoru opened this issue Mar 21, 2022 · 1 comment

Comments

@agoraluoru
Copy link

agoraluoru commented Mar 21, 2022

Hi, I have a problem. When I use the SendWithStartTLS function to send mail, It produces an error message: 504 5.7.4 Unrecognized authentication type [HK2PR04CA0063.apcprd04.prod.outlook.com],The code is as follows:

tlsConfig := &tls.Config{
	InsecureSkipVerify: true,
	ServerName:         smtpServerHost,
}
// send email with starttls
// smtpServerAddr contains host and port of smtp server
err := em.SendWithStartTLS(smtpServerAddr, smtp.PlainAuth("", username, password, smtpServerHost), tlsConfig)

What should I do?

@agoraluoru agoraluoru changed the title Send SendWithStartTLS:504 5.7.4 Unrecognized authentication type [HK2PR04CA0063.apcprd04.prod.outlook.com] Mar 21, 2022
@rpromyshlennikov
Copy link

rpromyshlennikov commented Jun 14, 2022

As I remember, outlook uses LOGIN auth. This kind of auth is not included in Go stdlib, so try something like https://gist.github.com/andelf/5118732.

UPD: it also seems like duplicate for #113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants