8.8.130 • Published 10 months ago

@ellentorg/officia-dolorem-ad v8.8.130

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

loopback4-mailer

Installation

Install CloudfrontComponent using npm;

$ npm install @ellentorg/officia-dolorem-ad

Basic Use

Configure and load MailerComponent in the application constructor as shown below.

import {MailerComponent, CloudfrontComponentOptions} from 'loopback4-mailer';
import * as aws from '@aws-sdk/client-ses';
// ...

const ses = new aws.SES({
  apiVersion: "2010-12-01",
  region: "us-east-1",
  defaultProvider,
});

export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
  constructor(options: ApplicationConfig = {}) {
    // To configure component with single transport
    this.configure(MailerBindings.CONFIG).to({
      transport: [
        {
          name: 'default',
          transport: {
            streamTransport: true,
          }
        }
      ]
    });

    // To configure component with multiple transport
    this.configure(MailerBindings.CONFIG).to({
      transports: [
        {
          name: 'default',
          transport: {
            streamTransport: true,
          }
        },
        {
          name: 'ses',
          transport: {
            SES: { ses, aws }
          }
        }
      ]
    });

    this.component(MailerComponent);
    // ...
  }
  // ...
}

Usage

Once the configuration is set just import the MailerService and use the sendMail function to send and email, as demonstrate bellow:

import {service} from '@loopback/core';
import {MailerService} from '@ellentorg/officia-dolorem-ad';
import {get} from '@loopback/rest';

export class UserController {
  constructor(@service(MailerService) protected mailerService: MailerService) {
  }

  @get('/users')
  async create() {
    //create user...
    const {email} = user;
    await this.mailerService.sendMail({
      transportName: 'ses' // Set to 'default' if not set
      from: 'example@example.com',
      to: email,
      text: 'Verify your account'
    })
  }
}

Template adapter

Debug

To display debug messages from this package, you can use the next command:

DEBUG=loopback:mailer npm run start

Tests

Run npm test from the root folder.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

This project is licensed under the MIT

6.8.126

10 months ago

6.8.125

10 months ago

2.4.114

11 months ago

2.4.113

11 months ago

2.4.112

11 months ago

6.8.128

10 months ago

2.4.111

11 months ago

6.8.127

10 months ago

2.4.110

11 months ago

2.4.109

11 months ago

2.4.108

11 months ago

5.8.124

10 months ago

5.8.125

10 months ago

5.8.122

10 months ago

5.8.123

10 months ago

2.3.39

1 year ago

2.3.38

1 year ago

2.3.37

1 year ago

2.3.49

1 year ago

2.3.46

1 year ago

1.3.31

1 year ago

2.3.45

1 year ago

1.3.32

1 year ago

2.3.48

1 year ago

2.3.47

1 year ago

1.3.30

1 year ago

2.3.103

11 months ago

2.3.42

1 year ago

1.3.35

1 year ago

2.3.102

11 months ago

2.3.41

1 year ago

1.3.36

1 year ago

2.3.105

11 months ago

2.3.44

1 year ago

1.3.33

1 year ago

2.3.104

11 months ago

2.3.43

1 year ago

1.3.34

1 year ago

2.3.101

11 months ago

2.3.40

1 year ago

1.3.37

1 year ago

2.3.100

11 months ago

1.1.19

1 year ago

2.3.57

1 year ago

2.3.56

1 year ago

3.6.115

11 months ago

2.3.59

1 year ago

3.6.116

11 months ago

2.3.58

1 year ago

3.8.122

10 months ago

2.3.53

1 year ago

1.1.23

1 year ago

2.3.52

1 year ago

1.1.22

1 year ago

2.3.55

1 year ago

1.1.21

1 year ago

2.3.54

1 year ago

1.1.20

1 year ago

1.1.26

1 year ago

2.3.51

1 year ago

1.1.25

1 year ago

2.3.50

1 year ago

1.1.24

1 year ago

3.8.120

10 months ago

3.8.121

10 months ago

3.8.119

10 months ago

2.3.68

1 year ago

2.3.67

1 year ago

2.5.114

11 months ago

2.3.69

1 year ago

2.3.64

1 year ago

2.3.63

1 year ago

2.3.66

1 year ago

8.8.130

10 months ago

2.3.65

1 year ago

2.3.60

1 year ago

2.3.62

1 year ago

2.3.61

1 year ago

2.3.107

11 months ago

2.3.106

11 months ago

2.3.108

11 months ago

2.5.115

11 months ago

2.3.79

12 months ago

2.3.78

12 months ago

2.3.75

12 months ago

2.3.74

12 months ago

2.3.77

12 months ago

2.3.76

12 months ago

2.3.71

1 year ago

1.3.28

1 year ago

2.3.70

1 year ago

1.3.29

1 year ago

2.3.73

12 months ago

2.3.72

1 year ago

2.3.80

12 months ago

3.5.115

11 months ago

4.8.122

10 months ago

7.8.129

10 months ago

7.8.128

10 months ago

2.3.89

12 months ago

2.3.86

12 months ago

2.3.85

12 months ago

2.3.88

12 months ago

2.3.87

12 months ago

2.3.82

12 months ago

1.2.27

1 year ago

2.3.81

12 months ago

1.2.28

1 year ago

2.3.84

12 months ago

2.3.83

12 months ago

1.2.26

1 year ago

3.7.118

10 months ago

3.7.119

10 months ago

3.7.116

11 months ago

2.3.91

12 months ago

3.7.117

11 months ago

2.3.90

12 months ago

2.3.97

11 months ago

2.3.96

11 months ago

2.3.99

11 months ago

2.3.98

11 months ago

2.3.93

11 months ago

2.3.92

12 months ago

7.8.130

10 months ago

2.3.95

11 months ago

2.3.94

11 months ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago