Automatic Email Replies from Forms
After filling out the form, the system can automatically send a confirmation email to the client. The content of the email is configurable and may depend on the selected option in the form.
Configuration
To enable auto-reply, the form needs:
-
Confirmation Mailbox (
confirmation_mailbox) – sender’s address (e.g.formularze@firma.pl) -
Client Email Field (
client_email_field) – indicates which field in the form contains the recipient’s email -
Confirmation Subject (
confirmation_subject) – subject of the email -
Confirmation Body (
confirmation_body) – content of the email, supports Liquid
Liquid Variables
In the confirmation body, you can use variables corresponding to the field codes of the form:
{{ email }} → value of the field with code "email"
{{ imie }} → value of the field with code "imie"
{{ temat }} → value of the field with code "temat"
You set the field code in the field editing of the form (field “Code”).
Conditional Content (Liquid)
You can use if conditions for different content depending on the responses:
{% if temat == "Question about the offer" %}
Thank you for your interest! We will get back to you soon.
{% elsif temat == "Account deletion" %}
We have received your request regarding account deletion.
{% endif %}
Mail::Template Templates
For more complex HTML emails, instead of entering the entire content in the confirmation field, you can refer to an email template:
{% if temat == "Question about the offer" %}template:1 Questions > Offer{% endif %}
{% if temat == "Account deletion" %}template:1 Questions > Account Deletion{% endif %}
Where template:Template Name is a reference to the template in the Mail → Templates module. The system:
- Renders Liquid in
confirmation_body - If the result starts with
template:– it searches for the template by name - Uses the content and subject from the found template
- If the template has “Liquid” checked – it also renders variables in the template content
Internal Notification
In addition to the reply to the client, the form can send a notification to the team:
-
Notification Mailbox (
notification_mailbox) – the mailbox where the information about the new request will arrive - The email contains the responses from the form and a link to the result in the panel
Flow Summary
Client fills out the form
→ Form::Result.create
→ Notification to the team (notification_mailbox)
→ Reply to the client (confirmation_mailbox)
→ Liquid parses confirmation_body
→ If result = template:Name → loads Mail::Template
→ Sends email with template content