Infradox XS websites use your existing mail server to send website mail.
Every XS website must be configured with an e-mail account that the website can use to send notifications about new users registering, new or changed orders, quote requests and so on. But also to allow your website users to send links to e.g. galleries, preview pages and lightboxes. You can find more information about configuring e-mail for your website in the article XS first time configuration.
The website uses a number of e-mail templates that are centrally stored. It is possible to edit the text of those templates. If you do, a local copy will be stored and that copy will then be used to generate the e-mail.
You can find an overview of all templates and their uses in the article about localisation.
Templates and localisation
To change the text of an e-mail template, go to Site configuration and click on e-mail templates.
In the dropdown at the top, select the language that you want to see and/or change. After you have selected a language, the top list shows all the templates that XS uses. These are the standard templates. If there’s a local/changed copy of a template, it will display with a star icon in front of its name. Click a template to open the editor. If you save the template, a local copy will be created and used from then on. Local copies (i.e. changed templates) are shown in the list at the bottom. To change a local copy of a template, click its name in the list of modified templates. If you want to restore the original template then simply delete the local copy in the list at the bottom.
If your website uses more than one language, you may want to change the templates for each language. Change the language dropdown at the top to list the templates for that language / locale. However, the templates that are used to send notifications to administrators (e.g. of new orders etc) are not localised. The English version is used always, but you can of course translate those templates if you wish.
E-mail template codes
The templates have codes that will be replaced by the software. For instance the code [signature] can be used in a template to automatically insert your company name and contact details. You can of course create a local copy of an e-mail template with your signature as literal text. But the advantage of using the macro code instead, is that you can change your signature in one place only – without having to change any e-mail templates.
- Note that the codes must be embedded between square brackets.
- Certain codes can be used in certain templates only.
HTML formatting in your e-mail
The code [htmlformatting=1] is used to tell the mail server to use HTML formatted text. It must be at the top of the template. If you want to use plain text instead, then remove this code or change it to [htmlformatting=0]. If you use HTML formatted e-mail then make sure that you use HTML tags for paragraphs (<p></p>), line breaks (<br />) and so on.
Macro code for the e-mail subject line
If the code [mailsubject] is not found then the default for that specific type of e-mail will be used. You can add the [mailsubject] macro to have more control. It must be at the top of the template, underneath the line [htmlformatting=1].
The subject text can be literal text, but it can also contain other macro codes. Below is an example that is used in the activation template (sent to the user with a link to activate his/her account after registering).
[mailsubject=Registration information for [displayname] on [websitename]]
Overriding recipients and/or the sender
By default, the e-mail recipients and the sender e-mail address is automatically set based on what you have configured on the e-mail configuration page. You can override the settings by using codes in specific templates. You may for instance want order notifications to go a different e-mail address than quote requests.
The below codes can be used:
- email must be replaced by the e-mail address that you want to use, e.g. [email@example.com]
- name must be replaced by the actual name that you want to use, e.g. [sendername=John Doe]
- You must make sure that the e-mail address is valid
- You can use commas in the e-mail address to specify more than one recipient, e.g. [firstname.lastname@example.org,email@example.com]
- Recipient and/or Sender codes must be on their own line. So not more than one code on a line in the template
- You should only use these codes in the administrative notification e-mails
Below are a few of the codes that you can use in the templates. This list is not complete.
- [displayname] the user’s display name (which can be changed in the user’s account properties).
- [websitename] the name of your website as entered in the e-mail configuration.
- [websiteaddress] the address of your website as entered in the e-mail configuration.
- [signature] the full signature as configured, e.g. your website name, phone, contact info and so on.
Other codes can be viewed by editing an e-mail template and such codes are specific for the type of e-mail. For example:
- [activationlink] the url to confirm and activate a new account. Can be used in the activation template only.
- [pv_invnumber] the invoice number when sending an invoice (PDF attachment) to someone.
Custom e-mail template
You can create custom e-mail forms with the code editor. The data that is posted by such forms is parsed by used of the template ceform.txt. Note that this template is used always for such custom forms, the tag [formid] can be used to identify the source. The tag [postedfields] is used to output all form data in the format name=value. Other tags that can be used in this template are:
- [userid] id of the logged in user or 0 if guest
- [username] name of the logged in user
- [useremail] e-mail address of the logged in user
- [userorgname] organisation name of the logged in user
- [userip] ip address
- [useripcountry] country based on the visitor’s ip address
If you have problems with changed e-mail templates…
If your changes cause problems i.e. produce unexpected results, then restore the original template by deleting the local version (with your changes) in the list at the bottom of the page.
Below is an overview of the e-mail templates in alphabetical order. Note that admin templates are available in the US folder only. You can translate these if you want. E-mail templates that are sent to the administrator’s e-mail account are indicated with * admin. Whether or not templates are actually used depends on how you have configured your website and which options you have enabled.
This is sent to the user after he/she registered. The e-mail contains an activation link that lets the user enable the account.
By default, this is the same as the activation.txt template. It is sent to users who register as a contributor.
This template is used if a user did not register as a client and not as a contributor.
- adminordernotification.txt * admin
Notification for a new order
Notification for a new search request * admin
Notification for a new user account (someone registered)
Notification sent to a user when his/her order has changed (e.g. permissions were granted)
- apilicence.txt * admin
Notification to let you know an API-licence is about to expire
- ceform.txt * admin
Template used by custom e-mail forms
- contactus.txt * admin
Used to e-mail information posted with the contact us form
Used to send information to a contributor if someone wants to contact him/her
Template used when someone sends a link to a contributor’s profile page
- dpermissionsdisabled.txt * admin
Notification sent to let you know a user’s immediate download permissions have been automatically removed because the number of downloads in the set timeframe has been reached
This template is used to send an invoice PDF to a client
This invoice is sent to a user if an invoice is available for the user on your website
Used to send users reminders about unpaid invoices
- ispastats.txt * admin
Daily and/or weekly information with statistics about website use and files
- jobservernotification.txt * admin
Notification sent after a job has finished
The template that is used for lightbox e-mails
- myaccount.txt * admin
Used to notify you of changes a user made to his/her account or used to tell you which changes a user wants you to make
Used to send page links to users
Notifies users of changes to passwords
E-mail template with a link that lets users create a new password if they lost theirs
- pcquote.txt * admin
Sends data a user posted when using the price calculator dialog to request a quotation
- printform.txt * admin
Sends data if someone used the buy a print form
- quotechangetoadmin.txt * admin
Notification to let you know a user responded to a quotation that you’ve sent
Notification sent to the user if you make changes to a quotation
- quoteform.txt * admin
Data posted with the normal/plain text quotation form
Template used when a user didn’t receive his/her activation e-mail the first time
Notification sent to a user when a file reservation is about to expire or has expired
As above, but used to send a single e-mail to a user if multiple reservations are about to expire or have expired
Notification sent to a user when a file restriction is about to expire or has expired
As above, but used to send a single e-mail to a user if multiple restrictions are about to expire or have expired
Notification sent to a user if a staff member makes a change to a search request posted by the user
- security.txt * admin
Notification to inform you of multiple login failures, detected hacking attempts and other security related issues
Template used to send files to a user from the download pages
- sysadmin.txt * system
Notifications sent to the systemadmin about possible problems
Template used to send reminders to users if there are files for which usage has to be confirmed