Skip to content

A custom Directus extension that integrates ZeptoMail's HTTP API to send transactional emails.

License

Notifications You must be signed in to change notification settings

nawafinity/directus-extension-zeptomail

Repository files navigation

Directus Logo


🐰 Introduction

A custom Directus extension that integrates ZeptoMail's HTTP API to send transactional emails.

πŸ“š Table Of Contents

Why This Extension?

While setting up email functionality for a Directus-powered project, I encountered a limitation with my hosting environment on DigitalOcean, which does not support outbound SMTP connections by default. This restriction made it impossible to use traditional email plugins or SMTP-based providers.

To overcome this, I developed this extension to use ZeptoMail's HTTP APIβ€”a secure and reliable alternative to SMTPβ€”for sending transactional emails. This solution allows Directus to send emails without relying on SMTP, making it ideal for environments where SMTP is blocked or restricted.

✨ Features

  • Sends transactional emails using ZeptoMail's HTTP API.
  • Fully configurable via Module.
  • Can be triggered on any Directus lifecycle hook (e.g. user creation, login, password reset).
  • No SMTP dependency.

πŸ“¦ Installation

You can install the extension in one of two ways:

Option 1: πŸ›’ Directus ExtensionMarketplace (Recommended)

  1. Open your Directus Admin Panel.
  2. Go to Settings β†’ Extensions
  3. Click "Marketplace"
  4. Search for ZeptoMail
  5. Click install.

Option 2: πŸ“¦ Manual Installation via NPM

Using NPM

npm install directus-extension-zeptomail

Using PNPM

pnpm add directus-extension-zeptomail

Using YARN

yarn add directus-extension-zeptomail

πŸ“˜ Also take a look at the Directus Guide for more information on how to include and manage custom extensions in your Directus instance.

βš™οΈ Setup

After installing the extension, you'll need to configure by doing the following.

  1. Open your Directus Admin Panel.
  2. Navigate to Settings β†’ Modules.
  3. Enable the ZeptoMail Settings module.
  4. From the main navigation menu, click on ZeptoMail Settings.
  5. Fill out the configuration form as described below:
Field Description
API Token Your ZeptoMail API token (available in your ZeptoMail console).
From Address A verified sender email address (must be verified in your ZeptoMail account).
Name (Optional) The sender name that will appear in the recipient's inbox.
Track Clicks (Optional) Enable or disable click tracking.
Track Opens (Optional) Enable or disable open tracking.
Client Reference (Optional) A custom identifier for tracking individual transactions. See client_reference.

⚠️ Make sure your From Address is verified in ZeptoMail to avoid delivery issues.

⚠️ Limitations

  • Attachments are currently not supported due to Directus limitations. See #22223 for more details.
  • Batch sending is not supported for the same reason; however, the to field already accepts an array of recipients by default.
  • ZeptoMail Template API is not supported, as Directus handles email templates natively within its system.

πŸ› οΈ Contributing

Contributions are welcome! If you’d like to add new features, fix bugs, or improve the extension, feel free to submit a pull request. For major changes, please open an issue first to discuss what you’d like to do.

  1. Fork the repository
  2. Create your feature branch: git checkout -b my-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push to the branch: git push origin my-feature
  5. Open a pull request

🐞 Issues

Found a bug or have a feature request? Please open an issue on GitHub with a clear description and steps to reproduce (if applicable). Your feedback helps improve the extension!

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

❀️ Sponsoring

If you want to support our projects and help us group it, you can become a sponsor on GitHub or just donate on Buy Me Coffee.


Saudi made

Made with πŸ’š in Saudi Arabia

About

A custom Directus extension that integrates ZeptoMail's HTTP API to send transactional emails.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published