Blog Sections Open
Using Different SMTP Servers for Different FormIt Forms
A clean pattern for switching SMTP hosts and credentials per form when one project must deliver different classes of email through different providers.
Some projects eventually outgrow the assumption that all outgoing mail should go through one SMTP account. Support requests may need one mailbox, transactional mail another, and marketing or reporting messages yet another. The original question was about FormIt, but the pattern is useful anywhere you need per-form mail routing.
The safest approach is not to keep overwriting global mail settings blindly. Instead, treat each form as a mail context with its own transport settings.
Recommended strategy
- Identify the form by a stable key such as
formid. - Before sending mail, map that key to a specific SMTP host, username, password, and sender address.
- Apply those settings only for the current form request.
- Keep the fallback transport intact for everything else.
In practice that usually means a custom hook or wrapper around the mail step. The hook reads the form id, selects the right credentials, injects them into the mailer, and only then lets FormIt continue.
Why this matters
It avoids two common problems:
- one mailbox being used for the wrong kind of messages,
- future forms unexpectedly inheriting credentials that were meant only for one workflow.
Even if the site later changes SMTP providers, a per-form mapping layer keeps the logic understandable. That is much better than scattering credentials through snippets, chunks, or template calls.
So the right answer is yes: different SMTP servers per form are possible, but they should be selected intentionally through form-aware mail configuration instead of global settings hacks.
Source: Evolution CMS on GitHub.
Choosing a Lightweight Order Tracking System for MODX Evolution
How to think through a small order-status workflow in MODX Evolution when a full commerce stack would be overkill.
Faster Evolution CMS Updates and Better New-Version Notifications
A historical ecosystem note on making Evolution CMS updates easier to discover and apply through a more package-oriented update flow.