Email (SMTP) Settings

Connect GlobalForms to your mail server so forms can send email, for example notifications from the Email form action and password reset messages.

Before you begin

  • The details of an SMTP server that accepts mail from the GlobalForms server: host name, port, and whether it uses SSL/TLS.

  • A mail account (user name and password) if the server requires sign-in. Use a dedicated service account rather than a person's mailbox.

  • Access to config\local.json on the GlobalForms server.

Configure SMTP

  1. Add an smtp section under settings.email in config\local.json:

    JSON
    {
      "settings": {
        "email": {
          "smtp": {
            "host": "smtp.example.com",
            "port": 587,
            "secure": false,
            "auth": {
              "user": "forms@example.com",
              "pass": "<Password>"
            }
          }
        }
      }
    }
    
  2. Restart the GlobalForms service.

  3. In a form's Form Actions tab, add or edit an Email action and choose SMTP as the transport.

  4. Submit a test entry and confirm the email arrives.

Settings

Setting

Description

host

Required. Your SMTP server's host name or IP address. The SMTP option appears in Email actions only when this is set.

port

The SMTP port. Usually 587 (STARTTLS), 465 (SSL/TLS) or 25.

secure

true for port 465 (encrypted from the start). false for port 587 or 25. On port 587 the connection is upgraded to encryption when the server supports it.

auth.user, auth.pass

The account used to sign in to the mail server. Leave out auth if your server accepts mail without sign-in, for example an internal relay that allows the GlobalForms server's address.

allowUnauthorizedCerts

Optional. Set to true only for an internal mail server with a self-signed certificate. Not recommended.

Common mail providers

Provider

Host / port / secure

Notes

Microsoft 365

smtp.office365.com / 587 / false

SMTP AUTH must be enabled for the sending mailbox. Your Microsoft 365 administrator controls this.

Google Workspace / Gmail

smtp.gmail.com / 465 / true

Google does not accept the account's normal password. Use an app password (requires 2-Step Verification), or Google's SMTP relay service.

Internal mail relay

Your relay host / usually 25 / false

Often no sign-in. Ask your mail administrator to allow the GlobalForms server.

Troubleshooting

Symptom

Cause and fix

SMTP is not offered in the Email action

settings.email.smtp.host is missing or in the wrong section. Check the section names and restart the service.

Authentication failed

Check auth.user and auth.pass. For Gmail use an app password. For Microsoft 365, confirm SMTP AUTH is enabled for the mailbox.

Connection times out

A firewall is blocking the port, or the port and secure setting don't match. Try 587 with secure false, or 465 with secure true.

Certificate error

The mail server's certificate is not trusted. Use the server's correct host name, or fix the certificate on the mail server.

Mail is sent but not received

Check spam folders, and that the sending address is allowed to send for its domain (SPF/DKIM).