email
email copied to clipboard
SendWithStartTLS:504 5.7.4 Unrecognized authentication type [HK2PR04CA0063.apcprd04.prod.outlook.com]
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?
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 https://github.com/jordan-wright/email/issues/113.