Cleaned up READMEs
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Nodemailer - @kit/nodemailer
|
||||
# Mailers - @kit/mailers
|
||||
|
||||
This package provides a simple and easy to use mailer for sending emails using nodemailer.
|
||||
This package provides a proxy to use the registered mailer in the application.
|
||||
@@ -1,51 +0,0 @@
|
||||
# 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
|
||||
|
||||
By default, the package uses `nodemailer`.
|
||||
|
||||
To use [Resend](https:///resend.com)'s HTTP API, please set the environment variable `MAILER_PROVIDER` to `resend`.
|
||||
|
||||
```
|
||||
MAILER_PROVIDER=resend
|
||||
```
|
||||
|
||||
### Send an email
|
||||
|
||||
```tsx
|
||||
import { getMailer } from '@kit/mailers';
|
||||
|
||||
async function sendEmail() {
|
||||
const mailer = await getMailer();
|
||||
|
||||
return mailer.sendEmail({
|
||||
to: '',
|
||||
from: '',
|
||||
subject: 'Hello',
|
||||
text: 'Hello, World!'
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## Resend
|
||||
|
||||
If you're using the `resend` provider, please add the following environment variables:
|
||||
|
||||
```
|
||||
RESEND_API_KEY=your-api-key
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
# Nodemailer - @kit/nodemailer
|
||||
|
||||
This package provides a simple and easy to use mailer for sending emails using nodemailer.
|
||||
Reference in New Issue
Block a user