[Error] Mail send failed

Hi Guys,

I am trying to setup the smtp settings and am using gmail smtp server. When I click the send verification email, I get the below error:

at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
2018-06-29 22:51:02.812 +00:00 [Error] Mail send failed.
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at
   at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
   at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
   at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.M

ail.SendMailAsyncResult.End(IAsyncResult result)
at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)

smtp configuration:

[email protected]
globalSettings__mail__smtp__host=smtp.gmail.com
[email protected]
globalSettings__mail__smtp__password=XXXXXXXXXX
globalSettings__mail__smtp__ssl=true
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__useDefaultCredentials=false
globalSettings__disableUserRegistration=false

Any ideas?

Thanks

Are you using 2FA on your gmail account? You’ll need an app password if so.

There is no 2FA enabled with the account I’m using in the smtp config.

I am not sure. I would suggest testing your SMTP settings outside of Bitwarden to make sure that they work in general first.

Make sure you have “Allow less secure apps ON” in google settings.

craysiii,

I do actually have gmail accept less secure logins, but it is not working though.

I tried gmail & yahoo. Both don’t work.

I used both ports; ssl and tls. none worked. SSL config is there but I’m not sure how to force bitwarden to use tls. Is there a specific setting for that?

I want to buy the premium, but without testing and making sure all what I need is working, I can not go on with the purchase right now.

I appreciate your help guys.

Thanks

@gresso_gresso Honestly, I’ve never had much luck with Gmail SMTP for my various projects. The best solution I would recommend is to go with an email infrastructure provider that is designed for this kind of stuff, like a SendGrid, Mailgun, or Mailjet. All have free tiers and are relatively easy to set up with a domain. Plus, I know the latter two have port 2525 exposed, which will sometimes help with bypassing port restrictions in ISPs and certain cloud hosting platforms.

Thanks @bobanon, I used mail gun and it worked.