Index: branches/RC/core/kernel/utility/email_send.php =================================================================== diff -u -N -r11349 -r11657 --- branches/RC/core/kernel/utility/email_send.php (.../email_send.php) (revision 11349) +++ branches/RC/core/kernel/utility/email_send.php (.../email_send.php) (revision 11657) @@ -562,11 +562,6 @@ */ function SetEncodedEmailHeader($header, $address, $name) { - if ($header == 'To') { - // in case, when header is set directly - $address = $this->_replaceRecipientEmail($address); - } - $this->SetHeader($header, $this->QuotedPrintableEncode($name, $this->charset).' <'.$address.'>'); } @@ -1105,7 +1100,7 @@ $this->SetReturnPath($from_email); } - $this->SetEncodedEmailHeader('To', $to_email, $to_name ? $to_name : $to_email); + $this->SetTo($to_email, $to_name ? $to_name : $to_email); return $this->Deliver(); } @@ -1794,6 +1789,21 @@ } /** + * Sets "To" header. + * + * @param string $email + * @param string $first_last_name FirstName and LastName or just FirstName + * @param string $last_name LastName (if not specified in previous parameter) + */ + function SetTo($email, $first_last_name, $last_name = '') + { + $name = rtrim($first_last_name.' '.$last_name, ' '); + $email = $this->_replaceRecipientEmail($email); + + $this->SetEncodedEmailHeader('To', $email, $name ? $name : $email); + } + + /** * Sets "Return-Path" header (useful for spammers) * * @param string $email @@ -1812,8 +1822,6 @@ */ function AddTo($email, $first_last_name = '', $last_name = '') { - $email = $this->_replaceRecipientEmail($email); - $name = rtrim($first_last_name.' '.$last_name, ' '); $this->AddRecipient('To', $email, $name); } @@ -1874,6 +1882,8 @@ */ function AddRecipient($header_name, $email, $name = '') { + $email = $this->_replaceRecipientEmail($email); + if (!$name) { $name = $email; } Index: branches/RC/core/units/admin/admin_events_handler.php =================================================================== diff -u -N -r11495 -r11657 --- branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11495) +++ branches/RC/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 11657) @@ -244,19 +244,19 @@ $ret = preg_replace("/'(.*?)' => 'Array \((.*?), \)',/", "'\\1' => Array (\\2),", $ret); $ret = preg_replace("/\n '/", "\n\t'", $ret); + $this->Application->InitParser(); ob_start(); + echo $this->Application->ParseBlock(Array('name' => 'incs/header', 'body_properties' => 'style="background-color: #E7E7E7; margin: 8px;"')); ?> - - - Table "<?php echo $table_name; ?>" Structure - - - Close Window
- highlightString($ret); ?> -
Close Window
- - + + + Close Window

+ highlightString($ret); ?> +

Close Window
Application->ParseBlock(Array('name' => 'incs/footer')); echo ob_get_clean(); $event->status = erSTOP; } @@ -485,20 +485,22 @@ $prefix = $this->Application->GetVar('config_prefix'); $config_file = $this->Application->UnitConfigReader->prefixFiles[$prefix]; + $this->Application->InitParser(); + ob_start(); + echo $this->Application->ParseBlock(Array('name' => 'incs/header', 'body_properties' => 'style="background-color: #E7E7E7; margin: 8px;"')); ?> - - - Unit Config of "<?php echo $prefix; ?>" prefix - - - Close Window

- Prefix:
- Unit Config: highlightString($config_file); ?>
-
Close Window
- - + + + Close Window

+ Prefix:
+ Unit Config: highlightString($config_file); ?>
+
Close Window
+ Application->ParseBlock(Array('name' => 'incs/footer')); echo ob_get_clean(); $event->status = erSTOP; Index: branches/RC/core/units/email_messages/email_messages_event_handler.php =================================================================== diff -u -N -r11319 -r11657 --- branches/RC/core/units/email_messages/email_messages_event_handler.php (.../email_messages_event_handler.php) (revision 11319) +++ branches/RC/core/units/email_messages/email_messages_event_handler.php (.../email_messages_event_handler.php) (revision 11657) @@ -286,7 +286,7 @@ foreach ($recipient_emails as $recipient_email) { // 3. set recipient specific fields - $esender->SetEncodedEmailHeader('To', $recipient_email, $recipient_email); + $esender->SetTo($recipient_email, $recipient_email); $esender->Deliver(null, false, false); // 4. write to log Index: branches/RC/core/units/general/helpers/mailing_list_helper.php =================================================================== diff -u -N -r11319 -r11657 --- branches/RC/core/units/general/helpers/mailing_list_helper.php (.../mailing_list_helper.php) (revision 11319) +++ branches/RC/core/units/general/helpers/mailing_list_helper.php (.../mailing_list_helper.php) (revision 11657) @@ -40,7 +40,7 @@ } // 3. set recipient specific fields - $esender->SetEncodedEmailHeader('To', $email, $email); + $esender->SetTo($email, $email); $esender->Deliver(null, $mailing_id, false); // 4. write to log