2.6. Email Configuration¶
OnTask relies on the functionality included in Django to send emails from the application. The following variables can be used in the configuration file:
Host providing the SMTP service.
Port to communicate with the host
User account to log into the email host
Password for the account to log into the email host
Boolean stating if the communication should use TLS
Boolean stating if the communication should use SSL
Address to use when sending notifications
Send HTML text only, or alternatively, send text and HTML as an attachment
True(send HTML only)
Number of consecutive emails to send before pausing (to adapt to potential throttling of the SMTP server)
Number of seconds to wait between bursts.
An example of the content in the configuration is:
EMAIL_HOST=smtp.yourinstitution.org EMAIL_PORT=334 EMAIL_HOST_USER=mailmaster EMAIL_HOST_PASSWORD=somepassword EMAIL_USE_TLS=False EMAIL_USE_SSL=False EMAIL_ACTION_NOTIFICATION_SENDERfirstname.lastname@example.org EMAIL_BURST=500 EMAIL_BURST_PAUSE=43200
Set theses variables in the configuration file to the appropriate values before starting the application. Make sure the server is running in production mode. The development mode is configured to not send emails but show their content in the console instead.
2.6.1. Tracking Email Reads¶
If OnTask is deployed using SAML, all URLs are likely to be configured to go through the authentication layer. This configuration prevents OnTask from receiving the email read confirmations. In this case, the web server needs to be configured so that the SAML authentication is removed for the URL
trck (the one receiving the email read tracking). In Apache, this can be achieved by the following directive:
<Location /trck> Require all granted </Location>
If OnTask is not served from the root of your web server, make sure you include the absolute URL to
trck. For example, if OnTask is available through the URL
my.server.com/somesuffix/ontask, then the URL to use in the previous configuration is