> For the complete documentation index, see [llms.txt](https://cross-packages.gitbook.io/cross-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cross-packages.gitbook.io/cross-api/providers/mail.md).

# Mail

An implementation of email sends, it depends on the implementation of the mail template provider.

## Available:

* Smtp
* Amazon Ses
* Fake

## Methods:

**SendMail:** Sends an email using the chosen implementation.

```typescript
await this.mailProvider.sendMail({
  subject: 'Email subject',
  from: { email: 'sender@mail.com', name: 'Sender' },
  to: { email: 'addressee@mail.com', name: 'Addressee' },
  templateData: {
    file: resolve('..', 'file.hbs'),
    variables: { name: 'your name' },
  },
});
```

***
