Skip to content

Mail & SMTP

Inventorix sends transactional email — password resets, notifications, and warranty-expiry digests — through a configurable mail transport. You can set the transport via environment variables before first boot, and change it at any time through the in-app Settings → Mail screen without restarting workers.

TransportIdentifierPackage / driver
SMTPsmtpLaravel built-in
Postmarkpostmarksymfony/postmark-mailer
Resendresendresend/resend-php
Postalpostalsynergitech/laravel-postal
Amazon SESsesaws/aws-sdk-php
System sendmailsendmailLaravel built-in
Log (development)logLaravel built-in

The mail transport can be bootstrapped with environment variables. These values seed the database settings on first migration; thereafter, the admin UI is the source of truth.

VariableDefaultPurpose
MAIL_MAILERlogActive transport identifier (see table above)
MAIL_HOST127.0.0.1SMTP host
MAIL_PORT2525SMTP port
MAIL_SCHEME(null)smtp (STARTTLS) or smtps (SSL/TLS). Leave unset for plain/auto.
MAIL_USERNAME(null)SMTP username
MAIL_PASSWORD(null)SMTP password
MAIL_FROM_ADDRESShello@example.comEnvelope sender address
MAIL_FROM_NAME${APP_NAME}Envelope sender name
POSTMARK_API_KEY and RESEND_API_KEY are not in .env.example — these transport credentials are managed exclusively through the admin Mail settings UI and stored encrypted in the database.

For SES, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION may be used to bootstrap the initial database row, but at runtime the admin Settings → Mail screen stores dedicated SES credential fields (ses_key, ses_secret, ses_region). ApplySettings applies those dedicated fields to services.ses.{key,secret,region}; the shared storage AWS_* keys are not used for SES at runtime.

Inventorix exposes a Settings → Mail page in the admin panel (/app/settings/manage-mail-settings). Settings saved here are stored encrypted in the database and applied to the Laravel mail runtime on every request and queue job — no worker restart is required.

The database is the source of truth at runtime. Environment variables are read only during the settings migrations that create the initial database rows; afterwards, changes to .env mail keys have no effect while database settings exist.

Log in to the admin panel and navigate to Settings in the sidebar, then Mail.

From section

  • From address — the envelope sender address (e.g. noreply@yourcompany.com)
  • From name — the display name shown in email clients

Transport

Select the active driver from the dropdown. The relevant credential fields appear below.

DriverFields shown
SMTPHost, port, encryption scheme, username, password
PostalDomain URL, API key
Amazon SESAccess key ID, secret, region
PostmarkServer token, message stream ID (optional)
ResendAPI key
Sendmail(no additional fields)
Log(no additional fields)

Click Send test email in the page header. A modal asks for a recipient address (defaults to your own account email). The form is saved first, then a test message is dispatched using the transport you just configured. A green notification confirms delivery; a red persistent notification shows the transport error if delivery fails.

Emails not being sent

  1. Check that MAIL_MAILER is not log — or verify the database setting via Settings → Mail.
  2. For SMTP: confirm the host, port, and credentials. Port 587 with scheme smtp (STARTTLS) and port 465 with scheme smtps (SSL) are the most common combinations.
  3. Run the in-app test email action and read the error message in the failure notification.
  4. Check the application log (storage/logs/laravel.log) for transport exceptions.

Mailer reverts after restart

If you relied on .env variables and previously saved different values through the admin UI, the database settings take precedence. Update the values in Settings → Mail rather than in .env.