$location_of_bar = getPref($data_dir, $username, 'location_of_bar', SMPREF_LOC_LEFT);
$location_of_buttons = getPref($data_dir, $username, 'location_of_buttons', SMPREF_LOC_BETWEEN);
- global $collapse_folders, $show_html_default;
+ global $collapse_folders, $show_html_default, $show_xmailer_default;
$collapse_folders = getPref($data_dir, $username, 'collapse_folders', SMPREF_ON);
/* show_html_default is a int value. */
$show_html_default = intval(getPref($data_dir, $username, 'show_html_default', SMPREF_ON));
+ $show_xmailer_default = intval(getPref($data_dir, $username, 'show_xmailer_default', SMPREF_OFF ) );
global $include_self_reply_all;
$include_self_reply_all = getPref($data_dir, $username, 'include_self_reply_all', SMPREF_ON);
setPref($data_dir, $username, 'include_self_reply_all', $new_include_self_reply_all);
setPref($data_dir, $username, 'page_selector', $new_page_selector);
setPref($data_dir, $username, 'page_selector_max', $new_page_selector_max);
+ setPref($data_dir, $username, 'show_xmailer_default', $new_show_xmailer_default);
$js_autodetect_results = (isset($new_js_autodetect_results) ? $new_js_autodetect_results : SMPREF_JS_OFF);
if ($new_javascript_setting == SMPREF_JS_AUTODETECT) {
'refresh' => SMOPT_REFRESH_NONE
);
+ $optvals[] = array(
+ 'name' => 'show_xmailer_default',
+ 'caption' => _("Show the Mailer of incoming messages"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
/* Build all these values into an array of SquirrelOptions objects. */
$options = createOptionArray($optvals);
" </TR>" . "\n";
}
}
+ if ($show_xmailer_default) {
+ fputs ($imapConnection, sqimap_session_id() .
+ " FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer)]\r\n");
+ $read = sqimap_read_data ($imapConnection, sqimap_session_id(), true,
+ $response, $readmessage);
+ $mailer = substr($read[1], strpos($read[1], " "));
+ if (trim($mailer)) {
+ echo " <TR>\n" .
+ " <TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>\n" .
+ " "._("Mailer").": \n".
+ " </TD><TD BGCOLOR=\"$color[0]\" VALIGN=TOP colspan=2>\n" .
+ " <B>$mailer</B> \n" .
+ " </TD>" . "\n" .
+ " </TR>" . "\n";
+ }
+ }
+
do_hook("read_body_header");
echo '</TABLE>' .
' </TD></TR>' .