def _get_priorities(self):
        """
        Load priorities from parameters.
        :return: dict
        """
        key = 'mail.sending.job.priorities'
        try:
            priorities = ast.literal_eval(
                self.env['ir.config_parameter'].sudo().get_param(
                    key, default='{}'))
        # Catch exception to have a understandable error message
        except (ValueError, SyntaxError):
            raise exceptions.UserError(
                _("Error to load the system parameter (%s) "
                  "of priorities") % key)
        # As literal_eval can transform str into any format, check if we
        # have a real dict
        if not isinstance(priorities, dict):
            raise exceptions.UserError(
                _("Error to load the system parameter (%s) of priorities.\n"
                  "Invalid dictionary") % key)
        return priorities