Sending email with vapor

I’m creating a contact us page for my website that using a contact form. I’m looking for a way to handle that contact form: get all the data filled out by the user (email, title, message) then send it to my own email for support or CRM. However, I can’t find any tutorial online for how to send email with vapor and this topic is not cover in the book either. If someone can point me to the right direction that would be really great. Thank you!

Checkout the password reset chapter, that uses SendGrid to send emails to reset a password

1 Like

What about using Mailgun. It is a SwiftPackageManager that can handle sending emails through Vapor.

Mailgun works in a very similar way and is just as good an option

1 Like
  1. It’s free.
  2. Unlimited (You simply associate an email from which you want the emails to be triggered).
  3. You don’t need an API key or create accounts on third-party platforms.
  4. Greater flexibility for mailing. You can dynamically define the sender of emails.
  5. And much more.