Added README.md files for several @kit packages including Supabase, UI, Emails, Billing, and Mailers. These documents explain the purpose and usage of each package, facilitating better understanding for developers interacting with them.
33 lines
620 B
Markdown
33 lines
620 B
Markdown
# Mailers - @kit/mailers
|
|
|
|
This package is responsible for sending emails using a unified interface across the app.
|
|
|
|
The default mailer uses the `nodemailer` package to send emails. You can create custom mailers by extending the `Mailer` class.
|
|
|
|
Make sure the app installs the `@kit/mailers` package before using it.
|
|
|
|
```json
|
|
{
|
|
"name": "my-app",
|
|
"dependencies": {
|
|
"@kit/mailers": "*"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Send an email
|
|
|
|
```javascript
|
|
import { Mailer } from '@kit/mailers';
|
|
|
|
const mailer = new Mailer();
|
|
|
|
mailer.send({
|
|
to: '',
|
|
from: '',
|
|
subject: 'Hello',
|
|
text: 'Hello, World!'
|
|
});
|
|
``` |