1.0.2 • Published 3 months ago

@genezio/email-service v1.0.2

Weekly downloads
-
License
GPL-3
Repository
-
Last release
3 months ago

Genezio Email Service

Join our community Follow @geneziodev

Send emails from your application with genezio email service.

Install

Add the library to your project with the following command:

npm install @genezio/email-service

Import the library in your project the following way:

import { MailService } from "@genezio/email-service";

Basic usage

import { GenezioDeploy } from "@genezio/types";
import { MailService } from "@genezio/email-service";

@GenezioDeploy()
export class EmailService {
  async sendEmail(email: string, subject: string, message: string) {
    const response = await MailService.sendMail({
      emailServiceToken: "<token>",
      from: email,
      to: email,
      subject: subject,
      text: message
    });

    if (!response.success) {
      return response.errorMessage;
    }

    return "success";
  }
}

More informations about how to create a new enail service can be found here.

Learn more

For more details on how to use genezio, check the resources below:

Troubleshooting

If you are having issues with this library, feel free to contact us on Discord.

1.0.2

3 months ago

1.0.2-dev

3 months ago

1.0.1

4 months ago

1.0.0

4 months ago

1.0.1-dev

4 months ago

1.0.0-dev

4 months ago