VaporSMTPKit icon indicating copy to clipboard operation
VaporSMTPKit copied to clipboard

Can't sending emails

Open epodkorytov opened this issue 1 year ago • 1 comments

Hi, @joannisorlandos!

I'm using code from the example.

Can I send emails from a local server?

let email = Mail(from: "[email protected]", to: [MailUser(name: "Myself", email: "[email protected]")], subject: "Your new mail server!", contentType: .plain, text: "You've set up mail!" )

extension SMTPCredentials { static var default: SMTPCredentials { return SMTPCredentials( hostname: "smtp.gmail.com", ssl: .startTLS(configuration: .default), email: "[email protected]", password: ) } }

[ NOTICE ] Server starting on http://127.0.0.1:8080 [ INFO ] GET /sendEmail [request-id: 4341D182-D565-485C-B45C-75431EEC1C47] [ WARNING ] SMTPKitten.SMTPError.loginFailure [request-id: 4341D182-D565-485C-B45C-75431EEC1C47]

epodkorytov avatar Aug 18 '23 12:08 epodkorytov

Got a similar issue, loginFailure. In my case, I had to create a Google App Password ([email protected] in your case).

Using the new app password works for me.

landtanin avatar Dec 22 '23 08:12 landtanin