Socket
Socket
Sign inDemoInstall

@nextnm/nestjs-ses

Package Overview
Dependencies
70
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nextnm/nestjs-ses

NestJS provider for sending emails with ses


Version published
Weekly downloads
805
increased by19.26%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Nest Logo

NestJS SES (AWS emails)

NPM Version Package License NPM Downloads

Introduction

This is a simple wrapper of node-ses. It only comtemplates the send email functionality, but later it will be added more. Just ping me or open pull request and contribute :)

Installation

npm install @nextnm/nestjs-ses

Usage

Importing module
import { SesModule } from '@nextnm/nestjs-ses';
@Module({
  imports: [
    SesModule.forRoot({
      secret: '<YOUR SECRET>',
      apiKey: '<YOUR API_KEY>',
      region: 'eu-west-1',
    }),
  ],
  providers: [],
  exports: [],
})
export class YourModule {}
Interfaces
interface EmailOptions {
  from: string;
  to: string;
  subject: string;
  html?: string;
  replyTo?: string;
  cc: string;
  bcc: string[];
  altText?: string;
}
Calling Send Method
import { SesService } from '@nextnm/nestjs-ses';
import { SesEmailOptions } from '@nextnm/nestjs-ses'

@Injectable()
export class YourService {
  constructor(private sesService: SesService) {
    const options: SesEmailOptions = {
      from:'',
      to:'',
      subject:'',
      html:'',
      replyTo:'',
      cc:'',
      bcc:'',
      altText:'',
    };

    await this.sesService.sendEmail(options);
  }

Contributing

Contributions welcome! See Contributing.

Notes

This project is not endorsed by or affiliated with AWS.

Author

Nuno Carvalhão Site

License

Licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Last updated on 22 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc