Mẫu thư điện tử
From LimeSurvey Manual
Giới thiệu
Các mẫu email được sử dụng để gửi lời mời, lời nhắc, xác nhận và email đăng ký được cá nhân hóa cho những người tham gia của bạn (từ bảng người tham gia khảo sát). Bạn cũng có thể chỉnh sửa thông báo quản trị cơ bản (hoặc chi tiết) tiêu chuẩn được gửi tới quản trị viên khảo sát.
Mẫu email: Cài đặt > Menu khảo sát > Mẫu email

Bảng mẫu email
Bảng mẫu email:

Trong ảnh chụp màn hình ở trên, chế độ soạn thảo "nguồn HTML" được sử dụng. Để thay đổi cài đặt này, hãy đi tới cài đặt tài khoản cá nhân.
Năm loại email có thể được gửi tới người dùng hoặc quản trị viên:
Lời mời
Chức năng này được sử dụng để gửi email hàng loạt tới tất cả những người tham gia khảo sát trong bảng người tham gia khảo sát chưa nhận được lời mời hoàn thành khảo sát của bạn.
Từ bảng mẫu email, bạn có thể chỉnh sửa tin nhắn được gửi cho những người tham gia khảo sát. Để kiểm tra xem phần giữ chỗ email nào có thể được sử dụng, hãy tiếp tục đọc phần sau tiểu mục wiki. Bạn cũng có thể sử dụng ExpressionScript để tùy chỉnh thêm mẫu email lời mời của mình.
Nhắc nhở
Chức năng Nhắc nhở cung cấp một cách để quản trị viên khảo sát nhắc nhở những người tham gia từ bảng người tham gia khảo sát trả lời khảo sát.
Bạn có thể chỉnh sửa định dạng mặc định của email nhắc nhở từ Bảng mẫu email. Để xác minh xem phần giữ chỗ email nào có thể được sử dụng, hãy tiếp tục đọc phần sau tiểu mục wiki. ExpressionScript có thể giúp bạn tùy chỉnh nội dung văn bản của mẫu email này.
Xác nhận
Nếu mã thông báo được sử dụng và người tham gia điền vào bản khảo sát, một email xác nhận sẽ được gửi đến địa chỉ email của người đó. Bạn có thể tắt chức năng này từ bảng Cài đặt người tham gia.
Nhấp vào tab Xác nhận nếu bạn muốn chỉnh sửa mẫu email. Kiểm tra trình giữ chỗ email để xem những mẫu nào có thể được sử dụng trong loại email này. Bạn cũng có thể sử dụng ExpressionScript để tùy chỉnh email của mình.
Đăng ký
Nếu chế độ truy cập kín' được bật (có bảng người tham gia khảo sát, có nghĩa là chỉ những người tham gia có mục nhập được phân bổ và mã thông báo duy nhất được liên kết với nó mới có thể hoàn thành khảo sát tương ứng. Nếu bạn cho phép người tham gia đăng ký công khai khảo sát của bạn, một mục nhập mới trong bảng người tham gia khảo sát của bạn sẽ được tạo sau khi người trả lời đã gửi tên và địa chỉ email của mình. nền sẽ tự động gửi cho người trả lời tương ứng một email đăng ký. Nó chứa URL có mã thông báo mà người dùng mới đăng ký cần được truy cập.
Nhấp vào tab đăng ký để chỉnh sửa định dạng của email này. Trước tiên, đừng quên xem giữ chỗ email có thể được sử dụng trong nội dung văn bản. ExpressionScript có thể cung cấp thêm tùy chỉnh cho nội dung văn bản mà bạn muốn sử dụng.
Thông báo quản trị cơ bản và chi tiết
Để nhận thông báo của quản trị viên, hãy nhấp vào tab Quản lý dữ liệu và nhập địa chỉ email vào trường "Gửi email thông báo quản trị viên cơ bản tới" và một địa chỉ khác (hoặc tương tự) trong trường " Gửi email thông báo chi tiết của quản trị viên đến".
Theo mặc định, sự khác biệt duy nhất giữa hai loại này liên quan đến phần giữ chỗ bổ sung {ANSWERTABLE} được bao gồm trong mẫu email thông báo chi tiết của quản trị viên. Điều này cho phép người dùng nhận được những loại email này cũng có thể kiểm tra các câu trả lời đã gửi. Họ không phải truy cập vào phần cài đặt LimeSurvey.
Tuy nhiên, bằng cách sử dụng ExpressionScript và email placeholders bạn có thể tùy chỉnh hai mẫu email này.
Trường mẫu email
Mỗi mẫu email chứa:
- Tiêu đề email: Tiêu đề email/lô email bạn muốn gửi;
- Nội dung email: Một hộp văn bản chứa tin nhắn văn bản bạn muốn gửi cho những người tham gia. Nó có thể chứa văn bản, hình ảnh và giữ chỗ email. ExpressionScript cũng có thể được sử dụng để tùy chỉnh thêm thông điệp bạn muốn gửi;
- Hành động email: Có hai hành động:
- Đặt lại mẫu này: Sau khi nhấp vào, mã HTML sẽ được đặt lại. Không có văn bản nào bị xóa;
- Xác thực biểu thức: Kiểm tra logic của email - xem phần giữ chỗ có được sử dụng chính xác hay không. Chúng tôi thực sự khuyên bạn nên sử dụng nó trước khi gửi một loạt email. Bằng cách này, bạn có thể xem liệu trình giữ chỗ có được xác định chính xác hay không. Trong ví dụ dưới đây, có một lỗi đánh máy nhỏ - nó được nhấn mạnh bằng màu đỏ.

Phần giữ chỗ email
In the default email templates, different email placeholders are used either in the body and/or the subject of the email. Their role is to connect the email you want to send to each participant in your survey participants list. The data from the survey participants table (e.g., email, first name, last name, token, etc.) is automatically taken and put into different unique emails before being sent to each participant from your survey participants list.
Below are the email placeholders that can be used within the body message of your invitation and reminder email templates. When sending out the emails, these email placeholders will be replaced in the preview of your invitation/reminder email with data from your survey and survey participants table.
| {ADMINEMAIL} | Email of the Survey admin |
| {ADMINNAME} | Name of Survey Admin |
| {SURVEYNAME} | Title of your survey |
| {SURVEYDESCRIPTION} | Description of your survey |
The following placeholders are allowed in invitation/reminder email templates (subject and/or body fields) and they will be replaced when sending out the emails:
| {EMAIL} | Email of the recipient |
| {FIRSTNAME} | First Name |
| {LASTNAME} | Last Name |
| {SURVEYURL} | The URL to start the survey - if you are sending HTML emails, a full URL will be displayed to the survey participant |
| @@SURVEYURL@@ | The URL to start the survey - this is the barebone link. Use this if you want to integrate the link in your custom HTML elements somewhere (available in v1.90 and later) |
| {OPTOUTURL} | The URL to deactivate sending of emails for the respective survey - a full link will be displayed in the HTML version of the email template |
| {OPTINURL} | If a user is blacklisted and wants to participate in the respective survey, they have to click the opt-in URL to receive survey invitations/reminders again. |
| {GLOBALOPTOUTURL} | The URL for a respondent to opt-out of central participant list for this site - a full link will be displayed in the HTML version of the email template |
| {TOKEN} | The token to access the survey |
| {USESLEFT} | The number of uses left for the token |
| {VALIDFROM} | The date the token is valid from |
| {VALIDUNTIL} | The date the token is valid until |
| {EMAILSTATUS} | Used for skipping emails on email sending. Default email status is "OK". |
| {LANGUAGE} | Used to define the language to be used for emails and survey URL when using multilingual surveys |
| {SENT} | Invitation send date in ISO8601 format with time (Y-m-d H:i:s in PHP) |
| {REMINDERSENT } | Reminder send date in ISO8601 format with time (Y-m-d H:i:s in PHP) |
| {REMINDERCOUNT} | Number of reminders already sent |
| {COMPLETED } | Survey completion date |
| {TID} | Internal ID at token table |
| {ATTRIBUTE_1} | Attribute 1 |
| {ATTRIBUTE_2} | Attribute 2 (...and so on for more attribute fields) |
If your survey is not anonymous, the email placeholders can be used in order to add specific entry/participant data into the Survey text elements panel (e.g., survey description, welcome message, end message).
| {TOKEN:EMAIL} | Displays the email of the participant from the survey participants table |
| {TOKEN:FIRSTNAME} | Displays the first name of the participant from the survey participants table |
| {TOKEN:LASTNAME} | Displays the last name of the participant from the survey participants table |
| {TOKEN} | Displays the token code of the participant from the survey participants table |
| {TOKEN:ATTRIBUTE_1} | Displays "Attribute 1" of the participant from the survey participants table |
| {TOKEN:ATTRIBUTE_2} | Displays "Attribute 2" of the participant from the survey participants table (and so on for more attribute fields) |
These email placeholders can also be used in the confirmation and admin notification email templates.
Certain placeholders can be used only within the the admin notification templates. Please note that one email per response will be sent to the email address of the administrator!
Some of the placeholders that can be used only in the admin notification panels are mentioned below:
| {VIEWRESPONSEURL} | Displays an URL that redirects you to the respondent's submitted answer |
| {EDITRESPONSEURL} | Displays an URL that redirects you to a LimeSurvey page from where you can edit the responses submitted by the respective survey participant |
| {STATISTICSURL} | Click this URL to access the statistics of the survey |
| {ANSWERTABLE} | If you want to display the submitted answers of the participant in the admin notification email, use this email placeholder. This way, you no longer need to access your LimeSurvey installation in order to check the submitted answers of the respective respondent (as the {VIEWRESPONSEURL} placeholder does). |
- If your survey is using anonymized responses, then token-related placeholders will not work in the notification email template.
- You can use ExpressionScript to use expressions for tailoring an email (New in 1.92 ). Please have a look at the ExpressionScript how-tos for an example.
- Also have a look at the examples on using Information from survey participants table.
Participant Opt-out
When you use the {OPTOUTURL} tag in your invitation/reminder email, your participants can opt out of this particular survey by clicking the related URL in the email - so you don't send them reminder emails. A participant that opts out of your survey will have the email status 'OptOut' set in the survey participants list.
Barebone URL
URL placeholders have their corresponding Barebone URL. E.g., @@SURVEYURL@@: you can use @@OPTOUTURL@@, @@OPTINURL@@ …
Using Replacement Function
Some specific keywords can be used within your email templates. For example, certain keywords can be used to replaces the token URL address.
The below example uses a plain link to the survey instead of a long url:
1) First, access the email templates panel and choose Invitation.
2) Write the text you want to appear as a link to start the survey.
3) Then select that text.
4) Add the placeholder for the plain link @@SURVEYURL@@ and choose other from the protocol-select-box.
Now, when you send out your invitation emails, the link to start the survey will be shorter.
Email Attachments
File Actions
When clicking Add file the following window will be displayed asking you to choose the document from the files folder that you want to send via email:
Attachments can be added at the bottom of the email template editing interface. Please note that email attachments are uploaded on a per survey basis.
You can also upload, on the spot, a file from the desktop to your LimeSurvey installation by clicking the upload button and then selecting the file you want to attach to the respective email template.
Once selected, double click it and the file will be immediately displayed in the Files table, below the Add File button:
To have it permanently attached to the respective email template, do not forget to click the Save button located in the upper-right part of the window.
To determine if an attachment should be sent on an individual basis, it is possible to add a relevance equation to each attachment.
All functions supported by the ExpressionScript can be used, as well as token attributes if the survey uses tokens.
With notification or confirmation templates, it is also possible to use question codes used in the survey.
If you want to delete a file, click the red trash button located under the Action column and save the changes.
- When a file can not be found on the file system, the email will be sent without an attachment.
- Exporting/importing a survey does not export/import the attached uploaded files. However, the settings for attachments will be maintained, as well as the relevance equations.
Image Attachment
You can attach an image/images if you send HTML emails. To do this, you need to update the URL source of the image by settings its path to your public directory of your LimeSurvey instance.




