Skip to content

Can't sending emails #12

Description

@epodkorytov

Hi, @joannisorlandos!

I'm using code from the example.

Can I send emails from a local server?

let email = Mail(from: "email1@gmail.com",
to: [MailUser(name: "Myself", email: "email2@gmail.com")],
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: "email1@gmail.com",
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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions