HTML messages now have a converted plain-text attachment automatically added, for mail clients that only support text.
---- Changes since 1.450 ----
Added Module Config options to not include the X-Mailer and X-Originating-IP headers in sent mail.
+---- Changes since 1.470 ----
+When replying to a message, the original character set is used. Also, a bug that prevented the character set from being displayed when viewing a message is fixed.
+Messages with alternate HTML and text bodies are now send with the multipart/alternative content type, which fixes the problem of Gmail showing the body twice.
&check_modification($folder) if ($in{'delete'});
$mail || &error($text{'mail_eexists'});
+ # Find the body parts and set the character set
+ ($textbody, $htmlbody, $body) =
+ &find_body($mail, $config{'view_html'});
+ $main::force_charset = &get_mail_charset($mail, $body);
+
if ($in{'delete'}) {
# Just delete the email
if (!$in{'confirm'} && &need_delete_warn($folder)) {
elsif ($in{'print'}) {
# Show email for printing
&decode_and_sub();
- ($textbody, $htmlbody, $body) =
- &find_body($mail, $config{'view_html'});
&ui_print_header(undef, &decode_mimewords(
$mail->{'header'}->{'subject'}));
&show_mail_printable($mail, $body, $textbody, $htmlbody);
foreach $s (@sub) {
print &ui_hidden("sub", $s);
}
+print &ui_hidden("charset", $main::force_charset);
# Start tabs for from / to / cc / bcc
# Subject is separate
}
}
local $mt = $in{'html_edit'} ? "text/html" : "text/plain";
+ if ($in{'charset'}) {
+ $mt .= "; charset=$in{'charset'}";
+ }
if ($in{'body'} =~ /[\177-\377]/) {
# Contains 8-bit characters .. need to make quoted-printable
$quoted_printable++;
# View a single email message
require './mailboxes-lib.pl';
-$main::force_charset = '';
&ReadParse();
&can_user($in{'user'}) || &error($text{'mail_ecannot'});
if (&is_user($in{'user'})) {
$headstuff = &head_html($body->{'data'});
}
+# Set the character set for the page to match email
+$main::force_charset = &get_mail_charset($mail, $body);
+
&mail_page_header($text{'view_title'}, $headstuff, undef,
&folder_link($in{'user'}, $folder));
print &check_clicks_function();