sqgetGlobalVar('ent_num',$ent_num);
sqgetGlobalVar('saved_draft',$saved_draft);
sqgetGlobalVar('delete_draft',$delete_draft);
-sqgetGlobalVar('startmessage',$startMessage);
+sqgetGlobalVar('startMessage',$startMessage);
/** POST VARS */
sqgetGlobalVar('sigappend', $sigappend, SQ_POST);
$url_replytoallcc = '';
foreach( $url_replytoall_ar as $email => $personal) {
if ($personal) {
+ // if personal name contains address separator then surround
+ // the personal name with double quotes.
+ if (strpos($personal,',') !== false) {
+ $personal = '"'.$personal.'"';
+ }
$url_replytoallcc .= ", $personal <$email>";
} else {
$url_replytoallcc .= ', '. $email;
$use_signature, $composesession, $data_dir, $username,
$username, $key, $imapServerAddress, $imapPort, $compose_messages,
$composeMessage;
- global $languages, $squirrelmail_language;
+ global $languages, $squirrelmail_language, $default_charset;
$send_to = $send_to_cc = $send_to_bcc = $subject = $identity = '';
$mailprio = 3;
$bodypart = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $bodypart);
}
}
+
+ if (isset($body_part_entity->header->parameters['charset'])) {
+ $actual = $body_part_entity->header->parameters['charset'];
+ } else {
+ $actual = 'us-ascii';
+ }
+
+ if ( $actual && is_conversion_safe($actual) && $actual != $default_charset){
+ $bodypart = charset_decode($actual,$bodypart);
+ }
+
$body .= $bodypart;
}
if ($default_use_priority) {
if ($compose_new_win == '1') {
echo ' <TR>' . "\n" .
' <TD BGCOLOR="' . $color[0] . '" COLSPAN=2 ALIGN=CENTER>' . "\n" .
- ' <TEXTAREA NAME=body ROWS=20 COLS="' .
+ ' <TEXTAREA NAME=body ID=body ROWS=20 COLS="' .
$editor_size . '" WRAP="VIRTUAL">';
}
else {
echo ' <TR>' . "\n" .
' <TD BGCOLOR="' . $color[4] . '" COLSPAN=2>' . "\n" .
- ' <TEXTAREA NAME=body ROWS=20 COLS="' .
+ ' <TEXTAREA NAME=body ID=body ROWS=20 COLS="' .
$editor_size . '" WRAP="VIRTUAL">';
}
return $succes;
}
-?>
\ No newline at end of file
+?>