# @fabbijsc/medusa-plugin-aws-ses

> Aws SES plugin for Medusa

Latest version **1.1.0** (published 2024-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fabbijsc/medusa-plugin-aws-ses
pnpm add @fabbijsc/medusa-plugin-aws-ses
yarn add @fabbijsc/medusa-plugin-aws-ses
bun add @fabbijsc/medusa-plugin-aws-ses
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2024-03-27 |
| First published | 2024-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | FbbiJSC |
| Maintainers | fabbijsc |
| Keywords | aws, ses, ecommerce, headless, medusa, benly, marketplace |

## Links

- npm: https://www.npmjs.com/package/@fabbijsc/medusa-plugin-aws-ses
- npm.io page: https://npm.io/package/@fabbijsc/medusa-plugin-aws-ses

## Dependencies (4)

- [dotenv](https://npm.io/package/dotenv.md) 16.3.1
- [@medusajs/medusa](https://npm.io/package/@medusajs/medusa.md) 1.20.2
- [medusa-interfaces](https://npm.io/package/medusa-interfaces.md) ^1.3.8
- [@aws-sdk/client-ses](https://npm.io/package/@aws-sdk/client-ses.md) ^3.540.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2024-03-27
- 1.0.9 — 2024-03-27
- 1.0.8 — 2024-03-27
- 1.0.6 — 2024-03-27
- 1.0.5 — 2024-03-27
- 1.0.4 — 2024-03-27
- 1.0.3 — 2024-03-27
- 1.0.1 — 2024-03-27
- 1.0.0 — 2024-03-27

## README

# AWS SES (Fabbi JSC)
## Prerequisites

- [Medusa backend](https://docs.medusajs.com/development/backend/install)

---

## How to Install

1\. Run the following command in the directory of the Medusa backend:

  ```bash
  npm i @fabbijsc/medusa-plugin-aws-ses
  ```

2\. Set the following environment variables in `.env`:

  ```bash
AWS_ACCESS_KEY=
AWS_SECRET_KEY=
AWS_REGION=
SES_SENDER=
  ```

3\. In `medusa-config.js` add the following at the end of the `plugins` array:

  ```js
  const plugins = [
    // ...
    {
      resolve: `@fabbijsc/medusa-plugin-aws-ses`,
        options: {
            aws_credential: {
                access_key: process.env.AWS_ACCESS_KEY,
                secret_key: process.env.AWS_SECRET_KEY,
                region: process.env.AWS_REGION,
                sender: process.env.SES_SENDER,
            },
        }
    },
  ]
  ```

---

## Use the Plugin
  ```js
  import { TransactionBaseService } from '@medusajs/medusa';
import { ISesOption, SesService } from '@fabbijsc/medusa-plugin-aws-ses/dist';
import { EMailType } from '@enums/Mail.enum';

type ConstructorParams = {
    sesService: SesService;
};

interface IOption extends ISesOption {
    type: EMailType;
}

class MailService extends TransactionBaseService {
    sesService: SesService;

    constructor(private readonly container: ConstructorParams) {
    super(container);
    this.sesService = container.sesService;
}

async send(option: IOption): Promise<void> {
    await this.sesService.send(option, false);
}
}

export default MailService;

  ```

---
_Source: https://npm.io/package/@fabbijsc/medusa-plugin-aws-ses · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
