VaporSMTPKit
VaporSMTPKit copied to clipboard
Can't sending emails
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]
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.