Index: branches/5.2.x/core/kernel/utility/email_send.php =================================================================== --- branches/5.2.x/core/kernel/utility/email_send.php +++ branches/5.2.x/core/kernel/utility/email_send.php @@ -1213,6 +1213,7 @@ $this->SetCharset(null, true); $this->_logData = Array (); + $this->Application->removeObject('email-log'); } /** @@ -2132,8 +2133,17 @@ $result = $this->$send_method($message_headers, $message_body); if ( $result && $this->_logData ) { - // add e-mail log record - $this->Conn->doInsert($this->_logData, TABLE_PREFIX . 'EmailLog'); + /** @var kDBItem $email_log */ + $email_log = $this->Application->recallObject( + 'email-log', + null, + array('skip_autoload' => true) + ); + + $email_log->Clear(); + $email_log->SetDBFieldsFromHash($this->_logData); + $email_log->UpdateFormattersSubFields(); + $email_log->Create(); } if ( $immediate_clear ) { Index: branches/5.2.x/core/units/logs/email_logs/email_logs_config.php =================================================================== --- branches/5.2.x/core/units/logs/email_logs/email_logs_config.php +++ branches/5.2.x/core/units/logs/email_logs/email_logs_config.php @@ -90,7 +90,7 @@ 'default' => NULL ), 'EventParams' => Array ('type' => 'string', 'default' => NULL), - 'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''), + 'AccessKey' => Array ('type' => 'string', 'max_len' => 32, 'not_null' => 1, 'default' => ''), ), 'Grids' => Array (