require_once(SM_PATH . 'functions/url_parser.php');
require_once(SM_PATH . 'functions/html.php');
require_once(SM_PATH . 'functions/global.php');
+require_once(SM_PATH . 'functions/identity.php');
/**
* Given an IMAP message id number, this will look it up in the cached
$reply_to = '';
- if (isset($identity) && $identity != 'default') {
- $from_mail = getPref($data_dir, $username,
- 'email_address' . $identity);
- $full_name = getPref($data_dir, $username,
- 'full_name' . $identity);
- $from_addr = '"'.$full_name.'" <'.$from_mail.'>';
- $reply_to = getPref($data_dir, $username,
- 'reply_to' . $identity);
- } else {
- $from_mail = getPref($data_dir, $username, 'email_address');
- $full_name = getPref($data_dir, $username, 'full_name');
- $from_addr = '"'.$full_name.'" <'.$from_mail.'>';
- $reply_to = getPref($data_dir, $username,'reply_to');
- }
+ $ident = get_identities();
+ if(!isset($identity)) $identity = 0;
+ $full_name = $ident[$identity]['full_name'];
+ $from_mail = $ident[$identity]['email_address'];
+ $from_addr = '"'.$full_name.'" <'.$from_mail.'>';
+ $reply_to = $ident[$identity]['reply_to'];
+
if (!$from_addr) {
$from_addr = "$popuser@$domain";
$from_mail = $from_addr;
$now = getLongDateString( time() );
set_my_charset();
$body = _("Your message") . "\r\n\r\n" .
- "\t" . _("To:") . ' ' . decodeHeader($to,true,false) . "\r\n" .
- "\t" . _("Subject:") . ' ' . decodeHeader($header->subject,true,false) . "\r\n" .
+ "\t" . _("To:") . ' ' . decodeHeader($to,false,false) . "\r\n" .
+ "\t" . _("Subject:") . ' ' . decodeHeader($header->subject,false,false) . "\r\n" .
"\t" . _("Sent:") . ' ' . $senton . "\r\n" .
"\r\n" .
sprintf( _("Was displayed on %s"), $now );
$header = $message->rfc822_header;
$env = array();
- $env[_("Subject")] = decodeHeader($header->subject);
+ $env[_("Subject")] = str_replace(" "," ",decodeHeader($header->subject));
$from_name = $header->getAddr_s('from');
if (!$from_name) {
$from_name = $header->getAddr_s('sender');
if ($mdn_user_support) {
if ($header->dnt) {
if ($message->is_mdnsent) {
- $env[_("Read receipt")] = _("send");
+ $env[_("Read receipt")] = _("sent");
} else {
$env[_("Read receipt")] = _("requested");
if (!(handleAsSent($mailbox) ||
}
}
echo '<TABLE BGCOLOR="'.$color[9].'" WIDTH="100%" CELLPADDING="1"'.
- ' CELLSPACING="0" BORDER="0" ALIIGN="center">'."\n";
+ ' CELLSPACING="0" BORDER="0" ALIGN="center">'."\n";
echo '<TR><TD HEIGHT="5" COLSPAN="2" BGCOLOR="'.
$color[4].'"></TD></TR><TR><TD align=center>'."\n";
echo $s;
$comp_uri = 'src/compose.php' .
'?passed_id=' . $passed_id .
'&mailbox=' . $urlMailbox .
+ '&startMessage=' . $startMessage .
(isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:'');
if (($mailbox == $draft_folder) && ($save_as_draft)) {
- $comp_alt_uri = $comp_uri . '&action=draft';
+ $comp_alt_uri = $comp_uri . '&smaction=draft';
$comp_alt_string = _("Resume Draft");
} else if (handleAsSent($mailbox)) {
- $comp_alt_uri = $comp_uri . '&action=edit_as_new';
+ $comp_alt_uri = $comp_uri . '&smaction=edit_as_new';
$comp_alt_string = _("Edit Message as New");
}
if (isset($comp_alt_uri)) {
$s .= '</small></td>' . "\n" .
html_tag( 'td', '', 'right', '', 'width="33%" nowrap' ) . '<small>';
- $comp_action_uri = $comp_uri . '&action=forward';
+ $comp_action_uri = $comp_uri . '&smaction=forward';
$s .= makeComposeLink($comp_action_uri, _("Forward"));
if ($enable_forward_as_attachment) {
- $comp_action_uri = $comp_uri . '&action=forward_as_attachment';
+ $comp_action_uri = $comp_uri . '&smaction=forward_as_attachment';
$s .= $topbar_delimiter;
$s .= makeComposeLink($comp_action_uri, _("Forward as Attachment"));
}
- $comp_action_uri = $comp_uri . '&action=reply';
+ $comp_action_uri = $comp_uri . '&smaction=reply';
$s .= $topbar_delimiter;
$s .= makeComposeLink($comp_action_uri, _("Reply"));
- $comp_action_uri = $comp_uri . '&action=reply_all';
+ $comp_action_uri = $comp_uri . '&smaction=reply_all';
$s .= $topbar_delimiter;
$s .= makeComposeLink($comp_action_uri, _("Reply All"));
$s .= '</small></td></tr></table>';