Index: core/kernel/utility/email.php
===================================================================
--- core/kernel/utility/email.php
+++ core/kernel/utility/email.php
@@ -242,12 +242,28 @@
 		$this->_processRecipients();
 		$this->_changeLanguage(false);
 
+		// 1. set headers
+		try {
+			$message_headers = $this->_getHeaders();
+		}
+		catch ( Exception $e ) {
+			return $this->setError('Error parsing e-mail message headers');
+		}
+
+		$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
+		$this->sender->SetSubject($message_subject);
+
+		foreach ( $message_headers as $header_name => $header_value ) {
+			$this->sender->SetEncodedHeader($header_name, $header_value);
+		}
+
 		if ( $this->_storeEmailLog() ) {
 			// 1. prepare log
 			$this->logData = Array (
 				'From' => $this->fromName . ' (' . $this->fromEmail . ')',
 				'To' => $this->toName . ' (' . $this->toEmail . ')',
 				'OtherRecipients' => serialize($this->recipients),
+				'Subject' => $message_subject,
 				'Status' => EmailLogStatus::SENT,
 				'ErrorMessage' => '',
 				'SentOn' => TIMENOW,
@@ -262,25 +278,6 @@
 			$this->params['email_access_key'] = $this->_generateAccessKey();
 		}
 
-		// 1. set headers
-		try {
-			$message_headers = $this->_getHeaders();
-		}
-		catch ( Exception $e ) {
-			return $this->setError('Error parsing e-mail message headers');
-		}
-
-		$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
-		$this->sender->SetSubject($message_subject);
-
-		foreach ($message_headers as $header_name => $header_value) {
-			$this->sender->SetEncodedHeader($header_name, $header_value);
-		}
-
-		if ( $this->_storeEmailLog() ) {
-			$this->logData['Subject'] = $message_subject;
-		}
-
 		// 3. set body
 		try {
 			$html_message_body = $this->_getMessageBody(true);