Send email using mailgun API without any libraries
Mailgun is well known service provider which allows you send emails via their API or just using regular SMTP servers. SMTP protocol is bit slower, but it’s so common that you can use it everywhere. Each modern application allows you define your own SMTP server to send emails. But… we love speed, SMTP from it’s nature it’s bit slower then regular API call.
Code is super simple, you just need replace 2 variables: key-example and samples.mailgun.org with your own credentials.
If you are looking for more sophisticated examples, check out this blog post.