Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Configure the Mail Sender

 

Excerpt

The mail sender configuration refers the mail templates directory and the internationalization of the templates plus the sender itself.

 


When accessing ' Mail Sender Configuration' linkConfiguration link, you will see the following screen:

 

Image RemovedImage Added

Email Templates

...

Emails may be sent in multiple languages, based on the sender's language or on the receiver(s) language(s). The emails templates must be placed on disk, in a directory specified by you (see above), and must follow the convention below to get picked correctly by the SIL engine.

...

Let's see and example to understand how it works. Resolution of the file mytemplate.tpl for a given language (let's use French/France) is performed like this:

  1. Engine searches for fr_FR/mytemplate.tpl in the templates directory. If found, it is returned (we suppose the locale is French/France, and not for instance Canadian French). The directory searched there is the ISO 2 letter code of the language plus the ISO 2 letter country code.
  2. If it is not found, the engine searches next for for  fr/mytemplate.tpl . In other words, it drops the country code from the directory. If it is found, it will be returned.
  3. If still not found, the engine searches for mytemplate.tpl. This means that there's no localization available for this template. Again, if found, it is returned.
  4. If mytemplate.tpl is not found, the search results in error and the string may be interpreted as such

...

  1. .

With this algorithm cleared, let's see where the second parameter ('Mail language on sender/receiver') kicks in. If set on the sender, the locale is very easily determined - it is the sender's language - and the engine will send a single email, with the template resolved as above. If on the other hand, that parameter is set on the receiver, the engine will perform additional steps:

  1. Group recipients from TO, CC, BCC fields based on language.
  2. Resolve each template based on that language, as shown.
  3. Send mails to each group thus determined, to keep the language consistent.

Therefore, when setting the 'receiver' to determine the language, the engine may send multiple mails, one in each language; of course, maximal maximum number of mails sent is equal with the length of unique recipient list. While this is a very useful feature, this also impacts the performance and the memory used (if you're using queues).

...