/static.email

The easiest way to send emails on the Web

Primary LanguageJavaScriptISC LicenseISC

StaticEmail

Build Status Coverage Status License: ISC

The easiest way to send emails to yourself, as described in this post.

Back End

Publish a static website via zeit now, use static.email.ses as serverless function and call it a day 🎉

Client Side

Either import StaticEmail from 'static.email' or put the script on top of your page.

<script src="https://unpkg.com/static.email"></script>
<script>
StaticEmail({
  // your zeit now SES enabled serverless function
  path: '/api/paperboy',

  // optional fields
  from: 'Some Body <some@body.me>',
  subject: 'Is it really that simple?',

  // allowed content
  html: '<strong>Great Service!</strong>',
  md: '# Great Service!',
  text: 'Great Service'
})
  .then(() => console.log('email sent 🎉'))
  .catch(console.error);
</script>