Mail to receivers
This page is for website creators and administrators who decide where form submissions are mailed. Collections are always stored in the database (Setup > Collected information); the mail is a copy for the team that handles them. Sources: Forms with the information collector and 10.4 Mail.
Contents
Who receives the mail
| Level | Setting | Use |
|---|---|---|
| Whether to mail at all | collect.ini [EmailSettings] SendEmail (enabled), SendEmailList[<type>] (polls: disabled) | per form type |
| Default receiver | site.ini [InformationCollectionSettings] EmailReceiver | a general mailbox |
| Per form | a recipient attribute (Email) on the form object, used by the ezwebin mail templates | each form mails its own team |
| In your own templates | {set-block scope=root variable=email_receiver}...{/set-block} in the mail template | any rule you need |
The shipped Feedback form class (feedback_form) has a Recipient attribute that editors fill; with the ezwebin
mail template (extension/ezwebin/design/ezwebin/templates/content/collectedinfomail/feedback.tpl) the mail goes there.
The mail templates
| Template | Purpose |
|---|---|
content/collectedinfomail/<type>.tpl | the mail body for the type (form, feedback, poll) |
content/collectedinfo/<type>.tpl | the page the visitor sees after sending (with Display=result) |
Override them in your design (Template overrides) to give the mail a clear subject ("New report: <form name>"), the values in a readable order and a link to the collection in the administration.
Sending settings
site.ini [MailSettings]:
| Key | Values |
|---|---|
Transport | sendmail, SMTP or file |
TransportServer, TransportPort, TransportConnectionType, TransportUser, TransportPassword | your SMTP relay |
AdminEmail, EmailSender | the sender address |
Use your organization's mail relay; the sender domain must be allowed to send (SPF, DKIM, DMARC are configured on the
mail side). Put passwords in settings/override/ and keep them out of version control.
Testing without sending
Transport=file writes each mail to var/log/mail/ (or [MailSettings] FileTransportDirectory) instead of sending
it. Use it on test and staging installations, and check the files:
ls -lt var/log/mail/ | headUse test addresses on a reserved domain (for example example.invalid) in test forms; never real people's
addresses.
Good practice
| Practice | Why |
|---|---|
| Mail to shared team mailboxes, not personal ones | staff change; holidays |
| Keep the mail short, with a link to the collection, when submissions hold sensitive data | mail is copied, forwarded and kept long |
| Do not send the visitor's message back to the visitor's address automatically | anyone can type someone else's address; it turns your form into a spam relay |
| Remove the mailbox copies on the same schedule as the collections | Retention of collected information |
Related pages
- Building forms
- Information collector basics
- Mail preferences for administrators
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.