Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nest4it/email-module
NestJS module to send emails on an event-driven way.
https://github.com/nest4it/email-module
n4it nestjs sendgrid-mail
Last synced: about 2 months ago
JSON representation
NestJS module to send emails on an event-driven way.
- Host: GitHub
- URL: https://github.com/nest4it/email-module
- Owner: nest4it
- License: gpl-3.0
- Created: 2024-08-18T11:46:43.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T08:36:28.000Z (4 months ago)
- Last Synced: 2024-11-07T05:24:41.216Z (2 months ago)
- Topics: n4it, nestjs, sendgrid-mail
- Language: TypeScript
- Homepage: https://n4it.nl
- Size: 148 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @n4it/sendgrid-email-module
A NestJS module for sending emails with SendGrid. The `SendGridEmailModule` will listen to events and send emails via sendgrid accordingly.## Installation
To install the module, use npm:```bash
npm install @n4it/sendgrid-email-module
```## Usage
### Importing and Configuring the Module
To use the `SendGridEmailModule`, import it into your NestJS module and configure it using the `register` method. This method exposes an event listener, so you can sending emails.```typescript
import { SendGridEmailModule } from "@n4it/sendgrid-email-module";
import { Module } from "@nestjs/common";@Module({
imports: [
SendGridEmailModule.register({
logErrros: true,
apiKey: "SG-....",
fromEmail: "[email protected]",
exponentialBackoff: {
maxRetries: 3,
baseDelayMs: 1000
},
}),
],
})
export class AppModule {}
```## License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.## Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an issue on GitHub.## Support
If you have any questions or need support, you can contact us at [[email protected]](mailto:[email protected]).