/**
 * Method to delete a mail template
 *
 * @param   string  $key  The key of the mail template
 *
 * @return  boolean  True on success, false on failure
 *
 * @since   4.0.0
 */
public static function deleteTemplate($key)
{
    $db = Factory::getDbo();
    $query = $db->getQuery(true);
    $query->delete($db->quoteName('#__mail_templates'))->where($db->quoteName('template_id') . ' = :key')->bind(':key', $key);
    $db->setQuery($query);
    return $db->execute();
}