if (! isset($reply_id)) {
$reply_id = 0;
}
- if (! isset($MDN)) {
- $MDN = 'False';
+ if (! isset($MDN)) {
+ $MDN = 'False';
}
if (!saveMessageAsDraft($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id, $MDN)) {
showInputForm();
$draft_message = _("Draft Email Saved");
/* If this is a resumed draft, then delete the original */
if(isset($delete_draft)) {
- Header("Location: delete_message.php?mailbox=$draft_folder".
+ Header("Location: delete_message.php?mailbox=" . urlencode($draft_folder) .
"&message=$delete_draft&sort=$sort&startMessage=1&saved_draft=yes");
exit();
- }
+ }
else {
if ($compose_new_win == '1') {
Header("Location: compose.php?saved_draft=yes");
}
/*
* Set $default_charset to correspond with the user's selection
- * of language interface.
+ * of language interface.
*/
set_my_charset();
/*
* This is to change all newlines to \n
- * We'll change them to \r\n later (in the sendMessage function)
+ * We'll change them to \r\n later (in the sendMessage function)
*/
$body = str_replace("\r\n", "\n", $body);
$body = str_replace("\r", "\n", $body);
* Rewrap $body so that no line is bigger than $editor_size
* This should only really kick in the sqWordWrap function
* if the browser doesn't support "HARD" as the wrap type
- * Or, in Opera's case, something goes wrong.
+ * Or, in Opera's case, something goes wrong.
*/
$body = explode("\n", $body);
$newBody = '';
}
$body = $newBody;
- do_hook("compose_send");
-
+ do_hook('compose_send');
+
$MDN = False; // we are not sending a mdn response
if (! isset($mailprio)) {
$Result = sendMessage($send_to, $send_to_cc, $send_to_bcc,
exit();
}
if ( isset($delete_draft)) {
- Header("Location: delete_message.php?mailbox=$draft_folder".
+ Header("Location: delete_message.php?mailbox=" . urlencode( $draft_folder ).
"&message=$delete_draft&sort=$sort&startMessage=1&mail_sent=yes");
exit();
}
showInputForm();
/* sqimap_logout($imapConnection); */
}
-}
-elseif (isset($html_addr_search_done)) {
+} elseif (isset($html_addr_search_done)) {
if ($compose_new_win == '1') {
compose_Header($color, $mailbox);
}
}
}
showInputForm();
-}
-elseif (isset($html_addr_search)) {
+} elseif (isset($html_addr_search)) {
if (isset($HTTP_POST_FILES['attachfile']) &&
$HTTP_POST_FILES['attachfile']['tmp_name'] &&
$HTTP_POST_FILES['attachfile']['tmp_name'] != 'none') {
* click. If you can think of a better way, please implement it.
*/
include_once('./addrbook_search_html.php');
-}
-elseif (isset($attach)) {
+} elseif (isset($attach)) {
if (saveAttachedFiles()) {
plain_error_message(_("Could not move/copy file. File not attached"), $color);
}
}
showInputForm();
}
-elseif (isset($do_delete)) {
+elseif (isset($sigappend)) {
+ $idents = getPref($data_dir, $username, 'identities', 0);
+ if ($idents > 1) {
+ if ($identity == 'default') {
+ $no = 'g';
+ } else {
+ $no = $identity;
+ }
+ $signature = getSig($data_dir, $username, $no);
+ }
+ $body .= "\n\n".($prefix_sig==true? "-- \n":'').$signature;
+ if ($compose_new_win == '1') {
+ compose_Header($color, $mailbox);
+ } else {
+ displayPageHeader($color, $mailbox);
+ }
+ showInputForm();
+} elseif (isset($do_delete)) {
if ($compose_new_win == '1') {
compose_Header($color, $mailbox);
}
echo "\n" . '<FORM name=compose action="compose.php" METHOD=POST ' .
'ENCTYPE="multipart/form-data"';
do_hook("compose_form");
-
+
echo ">\n";
}
echo " <TR><td>\n </td><td>\n";
+ echo "\n <INPUT TYPE=SUBMIT NAME=\"sigappend\" VALUE=\"". _("Signature") . "\">\n";
if ($use_javascript_addr_book) {
echo " <SCRIPT LANGUAGE=JavaScript><!--\n document.write(\"".
" <input type=button value=\\\""._("Addresses").