https://github.com/xeaone/email
X-Email a Deno email client
https://github.com/xeaone/email
api deno email javascript sendgrid typescript
Last synced: about 2 months ago
JSON representation
X-Email a Deno email client
- Host: GitHub
- URL: https://github.com/xeaone/email
- Owner: xeaone
- License: mit
- Created: 2022-07-12T21:55:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T21:09:32.000Z (over 2 years ago)
- Last Synced: 2025-02-28T22:20:49.953Z (over 1 year ago)
- Topics: api, deno, email, javascript, sendgrid, typescript
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# X-Email
A Deno email API that uses web providers without any dependencies. See the [examples](./examples/send.ts).
## Example
```ts
import Email from 'https://deno.land/x/xemail/mod.ts';
const email = new Email();
email.key(key);
email.client('sendgrid');
const { html, text, attachments } = email.template({
title: 'Foo Bar',
provider: 'Super Man',
link: 'https://foobar.com/',
content: {
firstName: 'foo',
lastName: 'bar',
},
});
const result = await email.send({
name: 'Plants',
subject: 'Free Planting 🍑 🍆',
from: 'noreply@',
to: ['@gmail.com'],
html,
text,
attachments,
});
```