Index: branches/5.3.x/core/kernel/managers/subscription_manager.php =================================================================== diff -u -N -r15483 -r15677 --- branches/5.3.x/core/kernel/managers/subscription_manager.php (.../subscription_manager.php) (revision 15483) +++ branches/5.3.x/core/kernel/managers/subscription_manager.php (.../subscription_manager.php) (revision 15677) @@ -1,6 +1,6 @@ Conn->qstr($email_event_name) . ' AND Type = ' . $type; + $sql = 'SELECT TemplateId + FROM ' . $this->Application->getUnitOption('email-template', 'TableName') . ' + WHERE TemplateName = ' . $this->Conn->qstr($template_name) . ' AND Type = ' . $type; $id = $this->Conn->GetOne($sql); if ( !$id ) { - throw new Exception('E-mail event "' . $email_event_name . '" not found'); + throw new Exception('E-mail template "' . $template_name . '" not found'); } return $id;