> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shipthing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MailerSend

> Learn how to use MailerSend for sending emails.

To use MailerSend with ShipThing

<Steps>
  <Step title="Create a MailerSend account">
    [Create a MailerSend account](https://accounts.mailersend.com/) and grab your API key.
  </Step>

  <Step title="Add environment variables">
    Add the `MAILERSEND_TOKEN` environment variables to your .env.local file and your deployment environment:

    Then, make sure to activate MailerSend:

    ```ts /packages/email/index.ts theme={"system"}
    export * from './providers/mailersend';
    ```
  </Step>

  <Step title="Sending Emails">
    ```tsx apps/web/app/contact/actions/contact.tsx theme={"system"}
    import { mailerSendClient } from '@repo/email';
    import { ContactTemplate } from '@repo/email/emails/contact';
    import { render } from '@react-email/components';

    const emailHtml = await render(<ContactTemplate name={name} email={email} message={message} />);

    const sentFrom = new Sender("you@yourdomain.com", "Your name");
    const recipients = [
    new Recipient("your@client.com", "Your Client")
    ];

    const emailParams = new EmailParams()
    .setFrom(sentFrom)
    .setTo(recipients)
    .setSubject("This is a Subject")
    .setHtml(emailHtml)

    await mailerSendClient.email.send(emailParams);
    ```
  </Step>
</Steps>
