PHPackages                             nstcactus/craft-utils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nstcactus/craft-utils

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nstcactus/craft-utils
=====================

A collection of utility classes to make my life easier when working on Craft CMS projects

5.0.0(9mo ago)02.9k2MITPHP

Since Sep 21Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/nstCactus/craft-utils)[ Packagist](https://packagist.org/packages/nstcactus/craft-utils)[ RSS](/packages/nstcactus-craft-utils/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (10)Used By (2)

Craft-utils
===========

[](#craft-utils)

This is a collection a Craft utilities to ease custom development on Craft CMS.

`AbstractModule`
----------------

[](#abstractmodule)

This base class for custom modules aims at making less painful to create a Craft module. Most of the time, all you have to do to register/customize the following components is to override the corresponding getter:

- translation category (reasonable default value provided)
- CP template roots (reasonable default value provided)
- site template roots (reasonable default value provided)
- twig extensions
- CP nav items
- CP routes
- site routes
- User permissions
- Craft variables additions
- element types
- view hooks

⚠️ There may be some performance implications as the getters are executed on each request. Do as little as possible in the getters, and return early if possible.

If you need to further optimize your code, it's easy to get rid of this module and register the components the traditional way.

`MailerComponentConfiguratorModule`
-----------------------------------

[](#mailercomponentconfiguratormodule)

This simple module lets you configure the Craft mailer component using environment variables.

Set the mailer transport adapter using the `NST_MAILER_TRANSPORT_TYPE` environment variable. Supported values: `smtp`, `mailchimp` (`mandrill` is also accepted, but it is deprecated) or `mailjet`.

Depending on the adapter you choose, different environments variables are needed to configure the adapter.

### Common to all adapters

[](#common-to-all-adapters)

- `NST_MAILER_FROM_NAME`: required — the name used in the `From:` header of outgoing emails
- `NST_MAILER_FROM_EMAIL`: required — the email used in the `From:` header of outgoing emails

### SMTP

[](#smtp)

- `NST_MAILER_SMTP_HOST`: required — the SMTP server hostname
- `NST_MAILER_SMTP_PORT`: required — the SMTP server port number
- `NST_MAILER_SMTP_USE_AUTHENTICATION`: boolean — whether the SMTP server requires authentication
- `NST_MAILER_SMTP_USERNAME`: required if `NST_MAILER_SMTP_USE_AUTHENTICATION` — the SMTP username
- `NST_MAILER_SMTP_PASSWORD`: required if `NST_MAILER_SMTP_USE_AUTHENTICATION` — the SMTP password
- `NST_MAILER_SMTP_ENCRYPTION`: the SMTP encryption method. Either `tls` or `ssl`

### Mailchimp

[](#mailchimp)

In order to use this adapter, the [`mailchimp-transactional`](https://plugins.craftcms.com/mailchimp-transactional) plugin must be installed.

See the documentation of the [`mailchimp-transactional`](https://github.com/perfectwebteam/craft-mailchimp-transactional?tab=readme-ov-file) plugin for details on the settings mapped to these environment variables.

- `NST_MAILER_MAILCHIMP_API_KEY`: required — the value of the `mailchimp-transactional` plugin `apiKey` setting
- `NST_MAILER_MAILCHIMP_SUBACCOUNT`: the value of the `mailchimp-transactional` plugin `subaccount` setting
- `NST_MAILER_MAILCHIMP_TEMPLATE`: the value of the `mailchimp-transactional` plugin `template` setting

### Mailjet

[](#mailjet)

In order to use this adapter, the [`mailjet`](https://plugins.craftcms.com/mailjet) plugin must be installed.

See the documentation of the [`mailjet`](https://github.com/bertoost/Craft-Mailjet?tab=readme-ov-file) plugin for details on the settings mapped to these environment variables.

- `NST_MAILER_MAILJET_API_KEY`: required — the value of the `mailjet` plugin `apiKey` setting
- `NST_MAILER_MAILJET_API_SECRET`: required — the value of the `mailjet` plugin `apiSecret` setting

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance58

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~184 days

Recently: every ~298 days

Total

9

Last Release

273d ago

Major Versions

1.1.0 → 2.0.02022-06-03

2.0.1 → 3.0.02022-06-27

3.1.1 → 4.0.02024-04-18

4.0.0 → 5.0.02025-10-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/353843?v=4)[nstcactus](/maintainers/nstcactus)[@nstcactus](https://github.com/nstcactus)

---

Top Contributors

[![nstcactus](https://avatars.githubusercontent.com/u/353843?v=4)](https://github.com/nstcactus "nstcactus (27 commits)")

### Embed Badge

![Health badge](/badges/nstcactus-craft-utils/health.svg)

```
[![Health](https://phpackages.com/badges/nstcactus-craft-utils/health.svg)](https://phpackages.com/packages/nstcactus-craft-utils)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393813.5k10](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
