This page explains how to configure email notifications in OpnForm.

By default, with a new Docker deployment, the email driver used is log, which simply logs the emails instead of sending them. To enable actual email sending, you need to set up a proper email configuration.

OpnForm uses Laravel’s mail system. For more detailed information, you can refer to the Laravel Mail documentation.

Supported Mail Drivers

Laravel supports various mail drivers, including SMTP, Mailgun, Postmark, Amazon SES, and more. In this guide, we’ll focus on setting up SMTP, which is widely used.

Configuring SMTP Settings

To configure SMTP, you need to set the following environment variables in your .env file:

VariableDescription
MAIL_MAILERSet this to smtp to use the SMTP driver.
MAIL_HOSTThe address of your SMTP server.
MAIL_PORTThe port used by your SMTP server (common ports are 25, 465, and 587).
MAIL_USERNAMEThe username for your SMTP account.
MAIL_PASSWORDThe password for your SMTP account.
MAIL_ENCRYPTIONThe encryption method used by your SMTP server (typically tls or ssl).
MAIL_FROM_ADDRESSThe email address that emails should be sent from.
MAIL_FROM_NAMEThe name that should appear as the sender of the emails.

The easiest way to get started with OpnForm is through our official managed service in the Cloud. It takes just 1 minute to try out the builder for free, with high availability, backups, security, and maintenance all managed for you.