Emails and mail formats
Advanced
 

Emails

The desk ships with emails enabled by default. The settings need to be configured in the Host & Mail settings area though.

With emails enabled, mails are sent directly via an smtp server. In situations where the mail server is not available for whatever reason, mails are held in in the database in a que and are sent whenever the mail server is available.

If, for whatever reason, you would like to disable emails, you can do so in protected/config/params.php file. Locate the following entry:

'enableMail' => true, // set to false to disable emails

The desk can also work in a mixed mode where you can store mails as a locally dumped eml file. This can be helpful for debugging or trouble shooting.

To enable, open protected/config/params.php file and locate the following lines:

'testMode' => false, //Set to true for local eml

Mail que, List Count

There is one more setting to note. By default, mail que is enabled. What this means is that all mails generated by the desk are dumped to the database and sent on cron. The exception being mails generated during interaction by any user working with tickets which though are sent right away are also logged in the que table. The que table is emptied whenever the cron runs for AD sync, which by default is set to run once every 24 hours. This can be used fro debugging outgoing mails if required. Each mail record contains a unix time stamp of when the mail was sent else a blank/null if the mail is still held in a que and could not be sent.

The advantage of such an approach is to protect against loosing mail if mail server is inaccesible for any reason when mails are generated. For trouble shooting mails, you may to turn this off or on based on your test scenario. Changing to false turns the que function off.

Do note if mail que is enabled, scheduled task or cron must have been setup to fire the kickron.php file as discussed in the section on cron.

Find the settings in the same params file:

//Email queue setting
 'emailQueue' => array(
 'enabled' => true,
 'listCount' => 10
 ),

Also note the listcount setting which is a counter for number of mails to be sent to an smtp server in one go. Some servers can be moody and blacklist applications if these send too many mails during a single request. Fine tune the default of 10 as required.

Mail Formats

Formats for outgoing emails from the desk can be customised. You would need some html and php skills though!

In most cases, a support technician at Idesk can help you with it.

Mail templates are located in server_path/protected/views/mail and are pretty straight forward.

Standard mail format example:

 

Subject lines indicate the workflow status as well.

Mail format for “Forgot Password”

Note: This is only used in case od WEB type Idesk user. Forgot password from login area do not work for AD type users as passwords for such users are not stored within the desk.

is located at server_path/protected/views/mail/forgotPassword.php. Sample mail format for forgot password