https://github.com/webreflection/static.email
The easiest way to send emails on the Web
https://github.com/webreflection/static.email
Last synced: over 1 year ago
JSON representation
The easiest way to send emails on the Web
- Host: GitHub
- URL: https://github.com/webreflection/static.email
- Owner: WebReflection
- License: isc
- Created: 2019-08-27T09:16:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-26T17:58:07.000Z (almost 7 years ago)
- Last Synced: 2024-12-31T15:25:36.308Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://medium.com/@WebReflection/how-to-send-emails-from-static-websites-9a34ceb9416c
- Size: 21.5 KB
- Stars: 41
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StaticEmail
[](https://travis-ci.com/WebReflection/static.email) [](https://coveralls.io/github/WebReflection/static.email?branch=master) [](https://opensource.org/licenses/ISC)
The easiest way to send emails to yourself, as described in [this post](https://medium.com/@WebReflection/how-to-send-emails-from-static-websites-9a34ceb9416c).
### Back End
Publish a static website via [zeit now](https://zeit.co/), use [static.email.ses](https://github.com/WebReflection/static.email.ses#readme) 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.
```html
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);
```