Examples by framework and server¶
Frameworks, CMSs and mail servers already know how to send over SMTP. To use FrontEngine, change the host, port and credential. No sending code changes.
Connection details¶
| Item | Value |
|---|---|
| Host | smtp-out.frontengine.net |
| Port | 587 with STARTTLS (recommended), or 465 with implicit TLS |
| Encryption | Required. TLS 1.2 or later |
| Authentication | AUTH PLAIN or AUTH LOGIN |
| Username | any text. The examples use frontengine |
| Password | the server key |
| Maximum size | 50 MB per message |
| Recipients | up to 100 per message |
In every case:
- the sender address (
From) must be on a domain verified for your server; - the key lives in an environment variable or a secret manager, never in the repository;
CRAM-MD5is not accepted. If the tool offers a choice, selectPLAINorLOGIN.
Laravel¶
File .env:
MAIL_MAILER=smtp
MAIL_HOST=smtp-out.frontengine.net
MAIL_PORT=587
MAIL_USERNAME=frontengine
MAIL_PASSWORD="your-key"
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
In recent Laravel versions, the MAIL_ENCRYPTION variable was replaced by MAIL_SCHEME. In that case, remove MAIL_ENCRYPTION and use MAIL_SCHEME=smtp for port 587 (STARTTLS is negotiated on its own) or MAIL_SCHEME=smtps for port 465.
After changing .env:
Django¶
File settings.py:
import os
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp-out.frontengine.net"
EMAIL_PORT = 587
EMAIL_USE_TLS = True # STARTTLS
EMAIL_HOST_USER = "frontengine"
EMAIL_HOST_PASSWORD = os.environ["FRONTENGINE_KEY"]
EMAIL_TIMEOUT = 30
DEFAULT_FROM_EMAIL = "My Store <[email protected]>"
SERVER_EMAIL = "[email protected]"
For port 465, use EMAIL_USE_SSL = True instead of EMAIL_USE_TLS. The two options cannot be on at the same time.
Test:
python manage.py sendtestemail [email protected]
Rails¶
File config/environments/production.rb:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "smtp-out.frontengine.net",
port: 587,
user_name: "frontengine",
password: ENV.fetch("FRONTENGINE_KEY"),
authentication: :plain,
enable_starttls_auto: true,
open_timeout: 10,
read_timeout: 30
}
config.action_mailer.default_options = { from: "My Store <[email protected]>" }
config.action_mailer.raise_delivery_errors = true
Spring Boot¶
File application.properties:
spring.mail.host=smtp-out.frontengine.net
spring.mail.port=587
spring.mail.username=frontengine
spring.mail.password=${FRONTENGINE_KEY}
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.connectiontimeout=10000
spring.mail.properties.mail.smtp.timeout=30000
With the spring-boot-starter-mail dependency, JavaMailSender uses these settings. Set the sender on each message with setFrom("[email protected]").
WordPress¶
WordPress sends through PHP's mail() function by default. To send over SMTP, install an SMTP plugin and fill in the fields. The names vary a little from one plugin to another:
| Plugin field | Value |
|---|---|
| SMTP Host | smtp-out.frontengine.net |
| SMTP Port | 587 |
| Encryption | TLS or STARTTLS |
| Authentication | On |
| Username | frontengine |
| Password | the server key |
| From Email | an address on the verified domain, such as [email protected] |
| Force From Email | On, so that other plugins do not replace the sender with an unverified domain |
Password outside the database
Several plugins let you set the password through a constant in wp-config.php, instead of storing it in the database. Use that option when it exists and keep wp-config.php outside the public directory or with restricted permissions.
If the plugin offers an "SSL" option for encryption, it corresponds to port 465.
Postfix as a smarthost¶
Use this configuration to make a Postfix server deliver all outbound email through FrontEngine.
File /etc/postfix/main.cf:
relayhost = [smtp-out.frontengine.net]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain, login
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
File /etc/postfix/sasl_passwd:
Apply:
Notes:
- The brackets around the host prevent the MX lookup and must be the same in both files.
- The
smtp_tls_CAfilepath varies by distribution. On Red Hat family systems, use/etc/pki/tls/certs/ca-bundle.crt. - Messages generated by the system itself (cron, alerts) leave with the local host's sender. Rewrite the sender to an address on the verified domain, for example with
sender_canonical_maps. - FrontEngine accepts up to 100 recipients per message. The Postfix default stays below that limit.
Test and follow the log:
echo "Test" | mail -s "Test through FrontEngine" -r [email protected] [email protected]
journalctl -u postfix -f
Microsoft Exchange¶
On an on-premises Exchange Server, create a send connector that delivers through FrontEngine as a smart host.
| Setting | Value |
|---|---|
| Connector type | Custom |
| Delivery | Route through smart host |
| Smart host | smtp-out.frontengine.net |
| Port | 587 |
| Smart host authentication | Basic authentication, offered only after starting TLS |
| Username | frontengine |
| Password | the server key |
| Address space | * for all external email, or only the domains you want |
| Source servers | the Mailbox servers that send |
| Maximum message size | up to 50 MB |
In the Exchange Management Shell:
$cred = Get-Credential # username: frontengine, password: the server key
New-SendConnector -Name "FrontEngine" `
-Custom `
-AddressSpaces "*" `
-SmartHosts "smtp-out.frontengine.net" `
-Port 587 `
-DNSRoutingEnabled $false `
-SmartHostAuthMechanism BasicAuthRequireTLS `
-AuthenticationCredential $cred `
-RequireTLS $true
Transactional email only
FrontEngine is not a service for a company's general correspondence or for campaigns. Use the connector for messages generated by systems, and restrict the address space or the senders to fit your case. Every domain used as a sender must be verified.
n8n, Zapier and other automation tools¶
Automation tools that have a generic "send email over SMTP" action always use the same fields:
| Field | Value |
|---|---|
| Host | smtp-out.frontengine.net |
| Port | 587 |
| Security | STARTTLS. If the tool only has an "SSL/TLS" option, use port 465 |
| Username | frontengine |
| Password | the server key |
| Sender | an address on the verified domain |
In n8n, create an SMTP credential with these values and use the send email node. With port 587, leave the "SSL/TLS" option off: the connection starts unencrypted and switches to TLS with STARTTLS before authentication.
If the tool only integrates over HTTP, use an HTTP request action with the format described in Examples by language.
If it does not work¶
| Symptom | Likely cause |
|---|---|
| Authentication failure | Wrong key, or the tool tried to authenticate without TLS |
| Connection timeout | The outbound network blocks the port. Try the other port |
| Certificate error | Wrong server clock or outdated certificate authority list |
| Sender refused | The From domain is not verified for the server |
Details are in Troubleshooting.