sqsession_unregister('session_expired_post');
session_write_close();
} else {
- foreach ($session_expired_post as $postvar => $val) {
- if (isset($val)) {
- $$postvar = $val;
- } else {
- $$postvar = '';
+ // these are the vars that we can set from the expired composed session
+ $compo_var_list = array ( 'send_to', 'send_to_cc','body','startMessage',
+ 'passed_body','use_signature','signature','attachments','subject','newmail',
+ 'send_to_bcc', 'passed_id', 'mailbox', 'from_htmladdr_search', 'identity',
+ 'draft_id', 'delete_draft', 'mailprio', 'edit_as_new', 'compose_messsages',
+ 'composesession', 'request_mdn', 'request_dr');
+
+ foreach ($compo_var_list as $var) {
+ if ( isset($session_expired_post[$var]) && !isset($$var) ) {
+ $$var = $session_expired_post[$var];
}
}
+
$compose_messages = unserialize(urldecode($restoremessages));
sqsession_register($compose_messages,'compose_messages');
sqsession_register($composesession,'composesession');
function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
global $editor_size, $default_use_priority, $body, $idents,
$use_signature, $data_dir, $username,
- $username, $key, $imapServerAddress, $imapPort, $compose_messages,
+ $key, $imapServerAddress, $imapPort, $compose_messages,
$composeMessage, $body_quote;
global $languages, $squirrelmail_language, $default_charset;
$from_htmladdr_search, $location_of_buttons, $attachment_dir,
$username, $data_dir, $identity, $idents, $delete_draft,
$mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
- $username, $compose_messages, $composesession, $default_charset,
+ $compose_messages, $composesession, $default_charset,
$compose_onsubmit, $oTemplate;
if (checkForJavascript()) {
}
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) .
- _("From:") . '</td>' . "\n" .
+ '<label for="identity">' . _("From:") . '</label></td>' . "\n" .
html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) .
' '.
addSelect('identity', $ident_list, $identity, TRUE);
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) .
- _("To") . ':</td>' . "\n" .
+ '<label for="send_to">' . _("To") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) .
addInput('send_to', $send_to, 60, 0, $onfocus_array). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Cc") . ':</td>' . "\n" .
+ '<label for="send_to_cc">' . _("Cc") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
addInput('send_to_cc', $send_to_cc, 60, 0, $onfocus_array). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Bcc") . ':</td>' . "\n" .
+ '<label for="send_to_bcc">' . _("Bcc") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
addInput('send_to_bcc', $send_to_bcc, 60, 0, $onfocus_array).'<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Subject") . ':</td>' . "\n" .
+ '<label for="subject">' . _("Subject") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) . "\n";
echo ' '.addInput('subject', $subject, 60, 0, $onfocus_array).
' </td>' . "\n" .
if(!isset($mailprio)) {
$mailprio = '3';
}
- echo ' ' . _("Priority") .
+ echo ' <label for="mailprio">' . _("Priority") . '</label>: '.
addSelect('mailprio', array(
'1' => _("High"),
'3' => _("Normal"),
if ($default_use_mdn) {
if ($mdn_user_support) {
echo ' ' . _("Receipt") .': '.
- addCheckBox('request_mdn', $request_mdn == '1', '1'). _("On Read").
- addCheckBox('request_dr', $request_dr == '1', '1'). _("On Delivery");
+ addCheckBox('request_mdn', $request_mdn == '1', '1') .
+ '<label for="request_mdn">' . _("On Read") . '</label>' .
+ addCheckBox('request_dr', $request_dr == '1', '1') .
+ '<label for="request_dr">' . _("On Delivery") . '</label>';
}
}
* using $show=false, and then when i'm ready to display the error
* message, show=true
*/
- global $body, $send_to, $send_to_bcc, $subject, $color;
+ global $send_to, $send_to_bcc;
if ($send_to == '' && $send_to_bcc == '') {
if ($show) {
} elseif (!$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SendMail.class.php');
global $sendmail_path, $sendmail_args;
+ // Check for outdated configuration
+ if (!isset($sendmail_args)) {
+ if ($sendmail_path=='/var/qmail/bin/qmail-inject') {
+ $sendmail_args = '';
+ } else {
+ $sendmail_args = '-i -t';
+ }
+ }
$deliver = new Deliver_SendMail(array('sendmail_args'=>$sendmail_args));
$stream = $deliver->initStream($composeMessage,$sendmail_path);
} elseif ($draft) {
}
return $success;
}
-?>
\ No newline at end of file
+?>