Email Servers, Templates and Automations
These three pages decide how Horilla sends mail and what it says. Email Servers holds the connection to your mail provider, Email Templates holds the wording, and Email Automations says when a template goes to whom. The Candidate Portal is related because candidates get their portal link by email (a Candidate Portal Login template exists for it), although its menu entry sits under Settings → Recruitment.
Email Servers
Go to Settings → Email → Email Servers (/settings/mail-server-conf/). This is where you tell Horilla which outgoing (SMTP) mail server to use for everything it emails: invitations, password messages, leave and payslip notices and automations. It only sends mail. It does not read your inbox.
As the administrator you see the page. The three other accounts we tried (Ravi, Sofia and Tom) are sent back to their dashboard when they type the address, and they have no Email group in Settings. Behind this, the page needs the view mail server permission. The Create button needs add, the edit icon needs change and the delete icon needs delete (read from the product code). The test-mail icon shows to everyone who can open the list.

- The Email group of the Settings menu
- Create
- The list of mail servers
- The row buttons for test, edit and delete
The list has three columns: Host User (the login name), Host (the server address) and Company. The sample company has one server, hr-notifications@lakesideworks.example on smtp.lakesideworks.example, for Lakeside Works Inc. The primary server's row is tinted. The row buttons are, from the left, Test email, Edit and Delete. We opened the edit and test windows and closed them again. We never sent a test mail or saved a change.
Test email opens a small Send Test Email window with one field, To email, and a Send Email button. It sends a short message through that row's server and tells you "Mail sent successfully" or shows the error (read from the product code).
After 2.4.0: Test email is now a real test
(read from the source of 2 December 2026; not run). In 2.4.0 the test connected with the settings of the signed-in person's company, not necessarily the row you clicked, and it honoured Fail Silently, so a broken server could still say "Mail sent successfully". In the latest source the test connects with the row you clicked, ignores Fail Silently, and shows the real error. If the server accepts nothing it says "The mail server did not accept the mail." Only a mail the server took gives "Mail sent successfully".

- Host and port
- Sender and login details
- TLS and SSL
- Fail Silently and Primary Mail Server
- Use Dynamic Display Name and the send timeout
- Save
| Field | What it does |
|---|---|
| Email Host (required) | The address of your provider's SMTP server, for example smtp.example.com. |
| Email Port (required) | The port number. 587 is the usual choice with TLS, 465 with SSL. The sample uses 587. |
| Default From Email (required) | The sender address shown on mail that goes out under the fixed display name. |
| Email Host Username (required) | The login for the SMTP server. It is also the name shown in the list. |
| Display Name (required) | The name shown beside the sender address, for example "Lakeside Works HR". |
| Email Authentication Password (required) | The SMTP password. See the warning below. |
| Use TLS | Encrypts the connection with STARTTLS. On by default. |
| Use SSL | Encrypts the connection from the first byte. Off by default. TLS and SSL cannot both be on. Horilla refuses to save and says they are mutually exclusive (read from the product code). |
| Fail Silently | When on, errors while sending are swallowed, so a failed mail shows no message. It is off by default on a new server but on in the sample, which means a broken connection there would go unnoticed. Switch it off while you are setting things up. (After 2.4.0 the Test email button ignores this switch, so the test always shows the real result.) |
| Primary Mail Server | Marks the fallback server. Horilla uses the server set up for the signed-in person's company and falls back to the primary one when the company has none. Marking a server as primary clears the flag on the others, and the very first server saved becomes primary on its own (read from the product code). |
| Use Dynamic Display Name | The info icon explains it: the display name is taken from the person who triggered the mail. With it on, a leave notice goes out as "Maya Chen <her work email>" and replies go to her, instead of "Lakeside Works HR". On by default. Some mail providers refuse to send from an address other than the one you log in with. If mail is rejected, switch this off. |
| Email Send Timeout (Seconds) (required) | How long Horilla waits for the server before giving up. The sample uses 5. |
The company is filled in for you and is hidden. A company can have only one server. Saving a second one for the same company is refused with "A mail server is already set up for this company. Edit the existing one instead." (read from the product code). The delete icon asks you to confirm. You cannot delete the only server ("You have only 1 Mail server configuration that can't be deleted"), and deleting the primary one first asks you to pick a replacement (also read from the product code; we did not delete anything).
WARNING
The password box is an ordinary text box, so the password is readable on screen to anyone who can open Edit. The sample shows a placeholder, not a real password. Give the change mail server permission only to people you would trust with that password, and do not take screenshots of this window with a real password in it.
Email Templates
Go to Settings → Email → Email Templates (/settings/mail-templates-view/). A template is a saved email body. Email Automations pick one from this list when they send. The same people who can see Email Servers see this page (the view mail template permission). View Template needs change, Create needs add, and the icons on each card need delete (read from the product code).

- The Email group
- Create
- A template's title with its duplicate and delete icons
- The body preview
- View Template
Each template is a card with its title, a preview of its body and a View Template button. The preview shows placeholders as plain text, such as {{ instance.employee_first_name }}, because they are filled in only when a mail is sent. There is no search box or filter. The sample company has nine templates: Time off request approved, Time off request declined, Welcome to Lakeside Works, Your payslip is ready, Interview invitation, Open enrollment reminder, Equipment checkout confirmation, Mid-year review reminder and Candidate Portal Login.

- Title
- The body editor
- The hint about typing {
- Save
- Title is required, must be unique and can be up to 100 characters (read from the product code). You choose the template by this name in an automation.
- Body is a rich text editor with the usual buttons: style, bold, underline, font, colour, lists, alignment, table, link, picture, video, full screen and code view.
- Placeholders. Under the editor the hint says "Type '{' to get sender or receiver data". Typing
{opens a list such as Receiver|Full name, Sender|Company or Candidate|Interview Table. Picking one inserts a placeholder like{{instance.get_full_name}}. In an automation,instanceis the record chosen under Mail Details (the receiver),selfis the person who made the change andmodel_instanceis the record that changed. The sample template Time off request approved uses{{ instance.employee_first_name }}for the greeting and{{ model_instance.start_date }}for the dates (read from the product code). - Company is set for you and is hidden.
Duplicate (the first icon on a card) opens the template in a window so you can save a copy. Titles must be unique, so change the title first. Delete (the red icon) asks "Do you want to delete this template?" and removes it at once.
Careful
Deleting a template also deletes every automation that uses it, because the automation is tied to the template (read from the product code; we did not delete anything).
When you save, Horilla cleans the body and keeps only basic formatting: paragraphs, bold, italic, underline, lists, line breaks, rules, tables, links and coloured text. Other markup, such as pictures, headings and scripts, is stripped (read from the product code). Send yourself a test through an automation before you rely on a fancy layout.
Email Automations
Go to Settings → Email → Email Automations (/settings/mail-automations-view/). An automation is a rule of the form "when a record of this kind is created or changed and it matches this condition, send this template to these people". It has four building blocks:
| Building block | Where you set it |
|---|---|
| Trigger: when to look | Model (which kind of record) and Trigger Condition (on create or on update) |
| Condition: which records count | The Condition table |
| Receiver: who gets it | Mail To, Also Sent to and Mail Details |
| Template: what it says | Mail Template (and Template Attachments) |
You need the view mail automation permission to open the page. Ravi, Sofia and Tom are sent to their dashboard. The Create button and the Actions menu need the add permission, but the create and edit window itself needs change. Someone who has only add would see the button and be turned away, so give both (read from the product code).

- The Email group
- Actions
- Create
- The automations list with its edit and delete buttons
The list shows Title, Model, Trigger, Delivery Channel and Email Mapping (who receives it, for example Employee > Get email). The Model column shows the product's internal path, such as leave.models.LeaveRequest. Click a row for a detail window with edit and delete icons. The sample company has five automations: a payslip notice (on update, email and notification), a welcome email for new hires (on create), a new time off request notice to the manager (on create, notification only), and time off declined and approved notices (both on update).
Actions holds two items. Load Automations is described below. Refresh Automations is explained under "Changes need a refresh". We did not press Refresh.

- Title and Model
- Mail To and Mail Details
- Trigger Condition and Mail Template
- Also Sent to and Choose Delivery Channel
- The Condition table
- Save
The picture shows the sample automation "Time off approved: notify the employee". We opened its edit window and the empty Create window and closed both without saving.
| Field | What it does |
|---|---|
| Title (required, unique) | The name in the list, and also the subject line of the email. It can contain placeholders, for example Review Leave Request - {{ instance.employee_id }}. In the title, instance is the changed record itself (read from the product code). |
| Model (required) | The kind of record to watch, such as LeaveRequest, Employee, Payslip or Candidate. The list covers almost every record type in Horilla. Picking one fills the next fields. |
| Mail To (required) | Who receives it. The choices come from the people linked to that record, for example (LeaveRequest) Employee's mail, Reporting Manager's mail or Created by's mail. You can pick several. |
| Mail Details (required) | Which record fills instance in the template, for example Employee (Template context). A choice ending in "(As a mail template)" uses a long-text field of the record, such as Description, as the email body itself (read from the product code). |
| Trigger Condition (required) | On Create, On Update or On Delete. See the warning below about On Delete. |
| Mail Template | The template to send. It is optional only when Mail Details points at a long-text field. |
| Also Sent to | Employees who get the mail as a copy (Cc), picked with a search and filter box. |
| Choose Delivery Channel (required) | Send as Email (the default), Send as Notification (a message in the person's notification bell, using the body as plain text) or Send as Email and Notification. |
| Template Attachments | Other templates that are attached to the email as a PDF named Document (read from the product code). |
| Condition (required) | The test a record must pass. See below. |
| Active | Inactive automations are ignored. |
| Save And Add Another | Shown only when creating. Saves and opens a blank form. |
The Condition table. Each row has a Code (C1, C2 and so on), a Field, a Condition, a Value and a Logic (And or Or) that joins it to the next row. The Field list holds the record's own fields and the fields of the people and items linked to it, for example Employee > Email or Leave Type > Name. The sample uses one row: Status == Approved. The workspace offers == and != only. The small buttons on each row copy or delete it, and the circle-arrow in the header reloads the table (the copy and delete buttons are read from the form's design; we did not press them).
Two rules from the product code are worth knowing:
- A record that does not match the condition sends nothing, and a condition is required, so there is no "send for everything" option.
- For On Update, Horilla sends only when a value used in the condition has changed since before the save. Approving a leave request fires "Time off approved" once, not on every later edit.
On Delete does nothing
The Trigger Condition list offers On Delete, but the product connects automations only to saves, so no mail is sent when a record is deleted (read from the product code; we did not test a deletion). Do not build a process on it.
Changes need a refresh. After you save, edit, load or delete an automation, a yellow banner appears: "Refresh required. Mail automation changes will not take effect on records until you run Refresh Automations." Open Actions → Refresh Automations to apply them (read from the product code; we did not press it).
Who is the sender. Mail goes out in the name of the person who made the change, and replies go to them. An automation also needs a signed-in person to fire at all. Changes made by background jobs with nobody signed in do not send mail (read from the product code).

- A ready-made automation card with its tick box
- The Add button
Actions → Load Automations opens the ready-made automations that ship with Horilla: leave request review, leave allocation review, new candidate, interview, recruitment manager, stage manager and more. Tick the ones you want and press Add. Horilla adds each automation, and its template if you do not have one with the same title yet. An automation with the same title as one you already have is skipped with the message "already exists" (read from the product code). We opened the window and closed it without pressing Add.
