Read Receipt (#41)

This commit is contained in:
RainLoop Team 2014-01-04 04:20:07 +04:00
parent 1dc5a45564
commit b100560cd8
37 changed files with 883 additions and 461 deletions

View file

@ -314,7 +314,7 @@ RainLoopApp.prototype.folderInformation = function (sFolder, aList)
bCheck = true;
oFlags = oData.Result.Flags[sUid];
RL.cache().storeMessageFlagsToCacheByFolderAndUid(oFolder.fullNameRaw, sUid.toString(), [
!oFlags['IsSeen'], !!oFlags['IsFlagged'], !!oFlags['IsAnswered'], !!oFlags['IsForwarded']
!oFlags['IsSeen'], !!oFlags['IsFlagged'], !!oFlags['IsAnswered'], !!oFlags['IsForwarded'], !!oFlags['IsReadReceipt']
]);
}
}

View file

@ -34,6 +34,7 @@ function MessageModel()
this.flagged = ko.observable(false);
this.answered = ko.observable(false);
this.forwarded = ko.observable(false);
this.isReadReceipt = ko.observable(false);
this.selected = ko.observable(false);
this.checked = ko.observable(false);
@ -89,6 +90,8 @@ function MessageModel()
this.attachments = ko.observableArray([]);
this.priority = ko.observable(Enums.MessagePriority.Normal);
this.readReceipt = ko.observable('');
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
@ -242,6 +245,7 @@ MessageModel.prototype.clear = function ()
this.flagged(false);
this.answered(false);
this.forwarded(false);
this.isReadReceipt(false);
this.selected(false);
this.checked(false);
@ -255,6 +259,7 @@ MessageModel.prototype.clear = function ()
this.attachments([]);
this.priority(Enums.MessagePriority.Normal);
this.readReceipt('');
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
@ -270,6 +275,17 @@ MessageModel.prototype.clear = function ()
this.lastInCollapsedThreadLoading(false);
};
MessageModel.prototype.computeSenderEmail = function ()
{
var
sSent = RL.data().sentFolder(),
sDraft = RL.data().draftFolder()
;
this.senderEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
this.toEmailsString() : this.fromEmailString());
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}
@ -314,17 +330,6 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
return bResult;
};
MessageModel.prototype.computeSenderEmail = function ()
{
var
sSent = RL.data().sentFolder(),
sDraft = RL.data().draftFolder()
;
this.senderEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
this.toEmailsString() : this.fromEmailString());
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}
@ -354,6 +359,8 @@ MessageModel.prototype.initUpdateByMessageJson = function (oJsonMessage)
this.foundedCIDs = Utils.isArray(oJsonMessage.FoundedCIDs) ? oJsonMessage.FoundedCIDs : [];
this.attachments(this.initAttachmentsFromJson(oJsonMessage.Attachments));
this.readReceipt(oJsonMessage.ReadReceipt || '');
this.computeSenderEmail();
bResult = true;
@ -411,6 +418,7 @@ MessageModel.prototype.initFlagsByJson = function (oJsonMessage)
this.flagged(!!oJsonMessage.IsFlagged);
this.answered(!!oJsonMessage.IsAnswered);
this.forwarded(!!oJsonMessage.IsForwarded);
this.isReadReceipt(!!oJsonMessage.IsReadReceipt);
bResult = true;
}
@ -791,6 +799,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
this.flagged(oMessage.flagged());
this.answered(oMessage.answered());
this.forwarded(oMessage.forwarded());
this.isReadReceipt(oMessage.isReadReceipt());
this.selected(oMessage.selected());
this.checked(oMessage.checked());

View file

@ -363,6 +363,26 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
}, Consts.Defaults.SaveMessageAjaxTimeout);
};
/**
* @param {?Function} fCallback
* @param {string} sMessageFolder
* @param {string} sMessageUid
* @param {string} sReadReceipt
* @param {string} sSubject
* @param {string} sText
*/
WebMailAjaxRemoteStorage.prototype.sendReadReceiptMessage = function (fCallback, sMessageFolder, sMessageUid, sReadReceipt, sSubject, sText)
{
this.defaultRequest(fCallback, 'SendReadReceiptMessage', {
'MessageFolder': sMessageFolder,
'MessageUid': sMessageUid,
'ReadReceipt': sReadReceipt,
'Subject': sSubject,
'Text': sText
});
};
/**
* @param {?Function} fCallback
* @param {string} sMessageFolder
@ -379,9 +399,10 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
* @param {(Array|null)} aDraftInfo
* @param {string} sInReplyTo
* @param {string} sReferences
* @param {boolean} bRequestReadReceipt
*/
WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFolder, sMessageUid, sSentFolder,
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences)
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences, bRequestReadReceipt)
{
this.defaultRequest(fCallback, 'SendMessage', {
'MessageFolder': sMessageFolder,
@ -397,6 +418,7 @@ WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFo
'DraftInfo': aDraftInfo,
'InReplyTo': sInReplyTo,
'References': sReferences,
'ReadReceiptRequest': bRequestReadReceipt ? '1' : '0',
'Attachments': aAttachments
}, Consts.Defaults.SendMessageAjaxTimeout);
};

View file

@ -264,12 +264,13 @@ WebMailCacheStorage.prototype.initMessageFlagsFromCache = function (oMessage)
mFlaggedSubUid = null
;
if (aFlags && 4 === aFlags.length)
if (aFlags && 5 === aFlags.length)
{
oMessage.unseen(aFlags[0]);
oMessage.flagged(aFlags[1]);
oMessage.answered(aFlags[2]);
oMessage.forwarded(aFlags[3]);
oMessage.isReadReceipt(aFlags[4]);
}
if (0 < oMessage.threads().length)
@ -300,7 +301,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCache = function (oMessage)
this.setMessageFlagsToCache(
oMessage.folderFullNameRaw,
oMessage.uid,
[oMessage.unseen(), oMessage.flagged(), oMessage.answered(), oMessage.forwarded()]
[oMessage.unseen(), oMessage.flagged(), oMessage.answered(), oMessage.forwarded(), oMessage.isReadReceipt()]
);
}
};

View file

@ -167,7 +167,6 @@ html.ssm-state-mobile {
}
}
.ui-resizable-helper {
border-right: 5px solid #777;
border-right-color: rgba(255,255,255,0.7);

View file

@ -1,4 +1,4 @@
showImages
html.rl-no-preview-pane {
.messageView {
@ -181,11 +181,15 @@ html.rl-no-preview-pane {
height: 0px;
}
.showImages {
.showImages, .readReceipt {
cursor: pointer;
background-color: #eee;
padding: 10px 15px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ddd;
background-color: #eee;
}
.readReceipt {
background-color: #ffffd9;
}
.attachmentsPlace {

View file

@ -79,11 +79,6 @@ function MailBoxMessageViewViewModel()
this.viewDate = ko.observable('');
this.viewMoment = ko.observable('');
this.viewLineAsCcc = ko.observable('');
this.viewHasImages = ko.observable(false);
this.viewHasVisibleAttachments = ko.observable(false);
this.viewAttachments = ko.observableArray([]);
this.viewIsHtml = ko.observable(false);
this.viewIsRtl = ko.observable(false);
this.viewViewLink = ko.observable('');
this.viewDownloadLink = ko.observable('');
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
@ -105,11 +100,6 @@ function MailBoxMessageViewViewModel()
this.viewDate(oMessage.fullFormatDateValue());
this.viewMoment(oMessage.momentDate());
this.viewLineAsCcc(oMessage.lineAsCcc());
this.viewHasImages(oMessage.hasImages());
this.viewHasVisibleAttachments(oMessage.hasVisibleAttachments());
this.viewAttachments(oMessage.attachments());
this.viewIsHtml(oMessage.isHtml());
this.viewIsRtl(oMessage.isRtl());
this.viewViewLink(oMessage.viewLink());
this.viewDownloadLink(oMessage.downloadLink());
@ -338,3 +328,22 @@ MailBoxMessageViewViewModel.prototype.showImages = function (oMessage)
oMessage.showExternalImages(true);
}
};
/**
* @param {MessageModel} oMessage
*/
MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
{
if (oMessage && '' !== oMessage.readReceipt())
{
RL.remote().sendReadReceiptMessage(Utils.emptyFunction, oMessage.folderFullNameRaw, oMessage.uid,
oMessage.readReceipt(),
Utils.i18n('READ_RECEIPT/SUBJECT', {'SUBJECT': oMessage.subject()}),
Utils.i18n('READ_RECEIPT/BODY', {'READ-RECEIPT': oMessage.readReceipt()}));
oMessage.isReadReceipt(true);
RL.cache().storeMessageFlagsToCache(oMessage);
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};

View file

@ -38,6 +38,8 @@ function PopupsComposeViewModel()
this.replyTo = ko.observable('');
this.subject = ko.observable('');
this.requestReadReceipt = ko.observable(false);
this.sendError = ko.observable(false);
this.sendSuccessButSaveError = ko.observable(false);
this.savedError = ko.observable(false);
@ -294,7 +296,8 @@ function PopupsComposeViewModel()
this.prepearAttachmentsForSendOrSave(),
this.aDraftInfo,
this.sInReplyTo,
this.sReferences
this.sReferences,
this.requestReadReceipt()
);
}
}
@ -1358,6 +1361,8 @@ PopupsComposeViewModel.prototype.reset = function ()
this.replyTo('');
this.subject('');
this.requestReadReceipt(false);
this.aDraftInfo = null;
this.sInReplyTo = '';
this.bFromDraft = false;

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.0",
"release": "624",
"release": "625",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -213,29 +213,35 @@ class MailClient
* @param bool $bIndexIsUid
* @param string $sMessageFlag
* @param bool $bSetAction = true
* @param bool $sSkipUnsupportedFlag = false
*
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
* @throws \MailSo\Net\Exceptions\Exception
* @throws \MailSo\Imap\Exceptions\Exception
* @throws \MailSo\Mail\Exceptions\Exception
*/
public function MessageSetFlag($sFolderName, $aIndexRange, $bIndexIsUid, $sMessageFlag, $bSetAction = true)
public function MessageSetFlag($sFolderName, $aIndexRange, $bIndexIsUid, $sMessageFlag, $bSetAction = true, $sSkipUnsupportedFlag = false)
{
$this->oImapClient->FolderSelect($sFolderName);
$oFolderInfo = $this->oImapClient->FolderCurrentInformation();
if (!$oFolderInfo || !$oFolderInfo->IsFlagSupported($sMessageFlag))
{
throw new \MailSo\Mail\Exceptions\RuntimeException('Message flag is not supported.');
if (!$sSkipUnsupportedFlag)
{
throw new \MailSo\Mail\Exceptions\RuntimeException('Message flag is not supported.');
}
}
else
{
$sStoreAction = $bSetAction
? \MailSo\Imap\Enumerations\StoreAction::ADD_FLAGS_SILENT
: \MailSo\Imap\Enumerations\StoreAction::REMOVE_FLAGS_SILENT
;
$sStoreAction = $bSetAction
? \MailSo\Imap\Enumerations\StoreAction::ADD_FLAGS_SILENT
: \MailSo\Imap\Enumerations\StoreAction::REMOVE_FLAGS_SILENT
;
$sIndexRange = \implode(',', $aIndexRange);
$this->oImapClient->MessageStoreFlag($sIndexRange, $bIndexIsUid, array($sMessageFlag), $sStoreAction);
$sIndexRange = \implode(',', $aIndexRange);
$this->oImapClient->MessageStoreFlag($sIndexRange, $bIndexIsUid, array($sMessageFlag), $sStoreAction);
}
}
/**

View file

@ -136,7 +136,12 @@ class Message
/**
* @var string
*/
private $sReadingConfirmation;
private $sDeliveryReceipt;
/**
* @var string
*/
private $sReadReceipt;
/**
* @var array
@ -196,7 +201,8 @@ class Message
$this->iSensitivity = \MailSo\Mime\Enumerations\Sensitivity::NOTHING;
$this->iPriority = \MailSo\Mime\Enumerations\MessagePriority::NORMAL;
$this->sReadingConfirmation = '';
$this->sDeliveryReceipt = '';
$this->sReadReceipt = '';
$this->aThreads = array();
$this->iThreadsLen = 0;
@ -415,12 +421,28 @@ class Message
return $this->sReferences;
}
/**
* @return string
*/
public function DeliveryReceipt()
{
return $this->sDeliveryReceipt;
}
/**
* @return string
*/
public function ReadReceipt()
{
return $this->sReadReceipt;
}
/**
* @return string
*/
public function ReadingConfirmation()
{
return $this->sReadingConfirmation;
return $this->ReadReceipt();
}
/**
@ -615,14 +637,15 @@ class Message
}
}
// ReadingConfirmation
$this->sReadingConfirmation = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::DISPOSITION_NOTIFICATION_TO);
if (0 === \strlen($this->sReadingConfirmation))
{
$this->sReadingConfirmation = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_CONFIRM_READING_TO);
}
// Delivery Receipt
$this->sDeliveryReceipt = \trim($oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::RETURN_RECEIPT_TO));
$this->sReadingConfirmation = \trim($this->sReadingConfirmation);
// Read Receipt
$this->sReadReceipt = \trim($oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::DISPOSITION_NOTIFICATION_TO));
if (empty($this->sReadReceipt))
{
$this->sReadReceipt = \trim($oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_CONFIRM_READING_TO));
}
$sDraftInfo = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_DRAFT_INFO);
if (0 < \strlen($sDraftInfo))

View file

@ -37,6 +37,7 @@ class Header
const SENSITIVITY = 'Sensitivity';
const RETURN_RECEIPT_TO = 'Return-Receipt-To';
const DISPOSITION_NOTIFICATION_TO = 'Disposition-Notification-To';
const X_CONFIRM_READING_TO = 'X-Confirm-Reading-To';

View file

@ -248,7 +248,7 @@ class Message
*
* @return \MailSo\Mime\Message
*/
public function SetReadConfirmation($sEmail)
public function SetReadReceipt($sEmail)
{
$this->aHeadersValue[\MailSo\Mime\Enumerations\Header::DISPOSITION_NOTIFICATION_TO] = $sEmail;
$this->aHeadersValue[\MailSo\Mime\Enumerations\Header::X_CONFIRM_READING_TO] = $sEmail;
@ -256,6 +256,16 @@ class Message
return $this;
}
/**
* @param string $sEmail
*
* @return \MailSo\Mime\Message
*/
public function SetReadConfirmation($sEmail)
{
return $this->SetReadReceipt($sEmail);
}
/**
* @param int $iValue
*

View file

@ -3581,10 +3581,10 @@ class Actions
});
}
$oAccount = $this->initMailClientConnection();
$sForwardedFlag = $oAccount ? strtolower($oAccount->Domain()->ForwardFlag()) : '';
$this->initMailClientConnection();
$sForwardedFlag = $this->Config()->Get('labs', 'imap_forwarded_flag', '');
$sReadReceiptFlag = $this->Config()->Get('labs', 'imap_read_receipt_flag', '');
try
{
$aInboxInformation = $this->MailClient()->FolderInformation($sFolder, $sPrevUidNext, $aFlagsFilteredUids);
@ -3597,7 +3597,8 @@ class Actions
'IsSeen' => in_array('\\seen', $aLowerFlags),
'IsFlagged' => in_array('\\flagged', $aLowerFlags),
'IsAnswered' => in_array('\\answered', $aLowerFlags),
'IsForwarded' => 0 < strlen($sForwardedFlag) && in_array(strtolower($sForwardedFlag), $aLowerFlags)
'IsForwarded' => 0 < strlen($sForwardedFlag) && in_array(strtolower($sForwardedFlag), $aLowerFlags),
'IsReadReceipt' => 0 < strlen($sReadReceiptFlag) && in_array(strtolower($sReadReceiptFlag), $aLowerFlags)
);
}
}
@ -3763,6 +3764,7 @@ class Actions
$sBcc = $this->GetActionParam('Bcc', '');
$sSubject = $this->GetActionParam('Subject', '');
$bTextIsHtml = '1' === $this->GetActionParam('TextIsHtml', '0');
$bReadReceiptRequest = '1' === $this->GetActionParam('ReadReceiptRequest', '0');
$sText = $this->GetActionParam('Text', '');
$aAttachments = $this->GetActionParam('Attachments', null);
@ -3798,6 +3800,11 @@ class Actions
}
}
if ($bReadReceiptRequest)
{
$oMessage->SetReadReceipt($oAccount->Email());
}
$oMessage->SetSubject($sSubject);
$oToEmails = \MailSo\Mime\EmailCollection::NewInstance($sTo);
@ -3904,6 +3911,60 @@ class Actions
return $oMessage;
}
/**
* @param \RainLoop\Account $oAccount
*
* @return \MailSo\Mime\Message
*/
private function buildReadReceiptMessage($oAccount)
{
$sReadReceipt = $this->GetActionParam('ReadReceipt', '');
$sSubject = $this->GetActionParam('Subject', '');
$sText = $this->GetActionParam('Text', '');
if (empty($sReadReceipt) || empty($sSubject) || empty($sText))
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
}
$oMessage = \MailSo\Mime\Message::NewInstance();
$oMessage->RegenerateMessageId();
$oMessage->SetXMailer('RainLoop/'.APP_VERSION);
$oSettings = $this->SettingsProvider()->Load($oAccount);
$sDisplayName = \trim($oSettings->GetConf('DisplayName', ''));
$sReplyTo = \trim($oSettings->GetConf('ReplyTo', ''));
$oMessage->SetFrom(\MailSo\Mime\Email::NewInstance($oAccount->Email(), $sDisplayName));
if (!empty($sReplyTo))
{
$oReplyTo = \MailSo\Mime\EmailCollection::NewInstance($sReplyTo);
if ($oReplyTo && $oReplyTo->Count())
{
$oMessage->SetReplyTo($oReplyTo);
}
}
$oMessage->SetSubject($sSubject);
$oToEmails = \MailSo\Mime\EmailCollection::NewInstance($sReadReceipt);
if ($oToEmails && $oToEmails->Count())
{
$oMessage->SetTo($oToEmails);
}
$this->Plugins()->RunHook('filter.read-receipt-message-plain', array($oAccount, &$oMessage, &$sText));
$oMessage->AddText($sText, false);
$this->Plugins()->RunHook('filter.build-read-receipt-message', array(&$oMessage, $oAccount));
return $oMessage;
}
/**
* @return array
*/
@ -3972,6 +4033,108 @@ class Actions
return $this->DefaultResponse(__FUNCTION__, $mResult);
}
private function smptSendMessage($oAccount, $oMessage, $rMessageStream, $bAddHiddenRcpt = true)
{
$oRcpt = $oMessage->GetRcpt();
if ($oRcpt && 0 < $oRcpt->Count())
{
$this->Plugins()->RunHook('filter.message-rcpt', array($oAccount, &$oRcpt));
try
{
$oSmtpClient = \MailSo\Smtp\SmtpClient::NewInstance()->SetLogger($this->Logger());
$oFrom = $oMessage->GetFrom();
$sFrom = $oFrom instanceof \MailSo\Mime\Email ? $oFrom->GetEmail() : '';
$aSmtpCredentials = array(
'Ehlo' => \MailSo\Smtp\SmtpClient::EhloHelper(),
'Host' => $oAccount->Domain()->OutHost(),
'Port' => $oAccount->Domain()->OutPort(),
'Secure' => $oAccount->Domain()->OutSecure(),
'UseAuth' => $oAccount->Domain()->OutAuth(),
'From' => empty($sFrom) ? $oAccount->Email() : $sFrom,
'Login' => $oAccount->OutLogin(),
'Password' => $oAccount->Password(),
'HiddenRcpt' => array()
);
$this->Plugins()->RunHook('filter.smtp-credentials', array($oAccount, &$aSmtpCredentials));
if (!$bAddHiddenRcpt)
{
$aSmtpCredentials[] = array();
}
$bHookConnect = $bHookAuth = $bHookFrom = $bHookFrom = $bHookTo = $bHookData = $bHookLogoutAndDisconnect = false;
$this->Plugins()->RunHook('filter.smtp-connect', array($oAccount, $aSmtpCredentials,
&$oSmtpClient, $oMessage, &$oRcpt,
&$bHookConnect, &$bHookAuth, &$bHookFrom, &$bHookTo, &$bHookData, &$bHookLogoutAndDisconnect));
if (!$bHookConnect)
{
$oSmtpClient->Connect($aSmtpCredentials['Host'], $aSmtpCredentials['Port'],
$aSmtpCredentials['Ehlo'], $aSmtpCredentials['Secure']);
}
if (!$bHookAuth)
{
if ($aSmtpCredentials['UseAuth'])
{
$oSmtpClient->Login($aSmtpCredentials['Login'], $aSmtpCredentials['Password']);
}
}
if (!$bHookFrom)
{
$oSmtpClient->MailFrom($aSmtpCredentials['From']);
}
if (!$bHookTo)
{
$aRcpt =& $oRcpt->GetAsArray();
foreach ($aRcpt as /* @var $oEmail \MailSo\Mime\Email */ $oEmail)
{
$oSmtpClient->Rcpt($oEmail->GetEmail());
}
if (isset($aSmtpCredentials['HiddenRcpt']) && is_array($aSmtpCredentials['HiddenRcpt']))
{
foreach ($aSmtpCredentials['HiddenRcpt'] as $sEmail)
{
if (\preg_match('/^[^@\s]+@[^@\s]+$/', $sEmail))
{
$oSmtpClient->Rcpt($sEmail);
}
}
}
}
if (!$bHookData)
{
$oSmtpClient->DataWithStream($rMessageStream);
}
if (!$bHookLogoutAndDisconnect)
{
$oSmtpClient->LogoutAndDisconnect();
}
}
catch (\MailSo\Net\Exceptions\ConnectionException $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
}
catch (\MailSo\Smtp\Exceptions\LoginException $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
}
}
else
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidRecipients);
}
}
/**
* @return array
*/
@ -4003,189 +4166,97 @@ class Actions
if (false !== $iMessageStreamSize)
{
$oRcpt = $oMessage->GetRcpt();
if ($oRcpt && 0 < $oRcpt->Count())
$this->smptSendMessage($oAccount, $oMessage, $rMessageStream);
if (is_array($aDraftInfo) && 3 === count($aDraftInfo))
{
$this->Plugins()->RunHook('filter.message-rcpt', array($oAccount, &$oRcpt));
$sDraftInfoType = $aDraftInfo[0];
$sDraftInfoUid = $aDraftInfo[1];
$sDraftInfoFolder = $aDraftInfo[2];
try
{
$oSmtpClient = \MailSo\Smtp\SmtpClient::NewInstance()->SetLogger($this->Logger());
$oFrom = $oMessage->GetFrom();
$sFrom = $oFrom instanceof \MailSo\Mime\Email ? $oFrom->GetEmail() : '';
$aSmtpCredentials = array(
'Ehlo' => \MailSo\Smtp\SmtpClient::EhloHelper(),
'Host' => $oAccount->Domain()->OutHost(),
'Port' => $oAccount->Domain()->OutPort(),
'Secure' => $oAccount->Domain()->OutSecure(),
'UseAuth' => $oAccount->Domain()->OutAuth(),
'From' => empty($sFrom) ? $oAccount->Email() : $sFrom,
'Login' => $oAccount->OutLogin(),
'Password' => $oAccount->Password(),
'HiddenRcpt' => array()
);
$this->Plugins()->RunHook('filter.smtp-credentials', array($oAccount, &$aSmtpCredentials));
$bHookConnect = $bHookAuth = $bHookFrom = $bHookFrom = $bHookTo = $bHookData = $bHookLogoutAndDisconnect = false;
$this->Plugins()->RunHook('filter.smtp-connect', array($oAccount, $aSmtpCredentials,
&$oSmtpClient, $oMessage, &$oRcpt,
&$bHookConnect, &$bHookAuth, &$bHookFrom, &$bHookTo, &$bHookData, &$bHookLogoutAndDisconnect));
if (!$bHookConnect)
switch (strtolower($sDraftInfoType))
{
$oSmtpClient->Connect($aSmtpCredentials['Host'], $aSmtpCredentials['Port'],
$aSmtpCredentials['Ehlo'], $aSmtpCredentials['Secure']);
}
if (!$bHookAuth)
{
if ($aSmtpCredentials['UseAuth'])
{
$oSmtpClient->Login($aSmtpCredentials['Login'], $aSmtpCredentials['Password']);
}
}
if (!$bHookFrom)
{
$oSmtpClient->MailFrom($aSmtpCredentials['From']);
}
if (!$bHookTo)
{
$aRcpt =& $oRcpt->GetAsArray();
foreach ($aRcpt as /* @var $oEmail \MailSo\Mime\Email */ $oEmail)
{
$oSmtpClient->Rcpt($oEmail->GetEmail());
}
if (isset($aSmtpCredentials['HiddenRcpt']) && is_array($aSmtpCredentials['HiddenRcpt']))
{
foreach ($aSmtpCredentials['HiddenRcpt'] as $sEmail)
case 'reply':
case 'reply-all':
$this->MailClient()->MessageSetFlag($sDraftInfoFolder, array($sDraftInfoUid), true,
\MailSo\Imap\Enumerations\MessageFlag::ANSWERED, true);
break;
case 'forward':
$sForwardedFlag = $this->Config()->Get('labs', 'imap_forwarded_flag', '');
if (0 < strlen($sForwardedFlag))
{
if (\preg_match('/^[^@\s]+@[^@\s]+$/', $sEmail))
{
$oSmtpClient->Rcpt($sEmail);
}
}
}
}
if (!$bHookData)
{
$oSmtpClient->DataWithStream($rMessageStream);
}
if (!$bHookLogoutAndDisconnect)
{
$oSmtpClient->LogoutAndDisconnect();
}
}
catch (\MailSo\Net\Exceptions\ConnectionException $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
}
catch (\MailSo\Smtp\Exceptions\LoginException $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError, $oException);
}
if (is_array($aDraftInfo) && 3 === count($aDraftInfo))
{
$sDraftInfoType = $aDraftInfo[0];
$sDraftInfoUid = $aDraftInfo[1];
$sDraftInfoFolder = $aDraftInfo[2];
try
{
switch (strtolower($sDraftInfoType))
{
case 'reply':
case 'reply-all':
$this->MailClient()->MessageSetFlag($sDraftInfoFolder, array($sDraftInfoUid), true,
\MailSo\Imap\Enumerations\MessageFlag::ANSWERED, true);
break;
case 'forward':
$sForwardFlag = $oAccount->Domain()->ForwardFlag();
if (0 < strlen($sForwardFlag))
{
$this->MailClient()->MessageSetFlag($sDraftInfoFolder, array($sDraftInfoUid), true,
$sForwardFlag, true);
}
break;
}
}
catch (\Exception $oException)
{
$this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
}
}
if (0 < strlen($sSentFolder))
{
try
{
if (!$oMessage->GetBcc())
{
if (\is_resource($rMessageStream))
{
\rewind($rMessageStream);
$sForwardedFlag, true);
}
$this->MailClient()->MessageAppendStream(
$rMessageStream, $iMessageStreamSize, $sSentFolder, array(
\MailSo\Imap\Enumerations\MessageFlag::SEEN
));
}
else
{
$rAppendMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
$iAppendMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
$oMessage->ToStream(false), array($rAppendMessageStream), 8192, true, true, true);
$this->MailClient()->MessageAppendStream(
$rAppendMessageStream, $iAppendMessageStreamSize, $sSentFolder, array(
\MailSo\Imap\Enumerations\MessageFlag::SEEN
));
if (is_resource($rAppendMessageStream))
{
@fclose($rAppendMessageStream);
}
}
}
catch (\Exception $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSaveMessage, $oException);
break;
}
}
if (\is_resource($rMessageStream))
catch (\Exception $oException)
{
@\fclose($rMessageStream);
$this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
}
if (0 < strlen($sDraftFolder) && 0 < strlen($sDraftUid))
{
try
{
$this->MailClient()->MessageDelete($sDraftFolder, array($sDraftUid), true, true);
}
catch (\Exception $oException)
{
$this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
}
}
$mResult = true;
}
else
if (0 < strlen($sSentFolder))
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::InvalidRecipients);
try
{
if (!$oMessage->GetBcc())
{
if (\is_resource($rMessageStream))
{
\rewind($rMessageStream);
}
$this->MailClient()->MessageAppendStream(
$rMessageStream, $iMessageStreamSize, $sSentFolder, array(
\MailSo\Imap\Enumerations\MessageFlag::SEEN
));
}
else
{
$rAppendMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
$iAppendMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
$oMessage->ToStream(false), array($rAppendMessageStream), 8192, true, true, true);
$this->MailClient()->MessageAppendStream(
$rAppendMessageStream, $iAppendMessageStreamSize, $sSentFolder, array(
\MailSo\Imap\Enumerations\MessageFlag::SEEN
));
if (is_resource($rAppendMessageStream))
{
@fclose($rAppendMessageStream);
}
}
}
catch (\Exception $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSaveMessage, $oException);
}
}
if (\is_resource($rMessageStream))
{
@\fclose($rMessageStream);
}
if (0 < strlen($sDraftFolder) && 0 < strlen($sDraftUid))
{
try
{
$this->MailClient()->MessageDelete($sDraftFolder, array($sDraftUid), true, true);
}
catch (\Exception $oException)
{
$this->Logger()->WriteException($oException, \MailSo\Log\Enumerations\Type::ERROR);
}
}
$mResult = true;
}
}
}
@ -4228,6 +4299,75 @@ class Actions
return $this->TrueResponse(__FUNCTION__);
}
/**
* @return array
*/
public function DoSendReadReceiptMessage()
{
$oAccount = $this->initMailClientConnection();
$oMessage = $this->buildReadReceiptMessage($oAccount);
$this->Plugins()->RunHook('filter.send-read-receipt-message', array(&$oMessage, $oAccount));
$mResult = false;
try
{
if ($oMessage)
{
$rMessageStream = \MailSo\Base\ResourceRegistry::CreateMemoryResource();
$iMessageStreamSize = \MailSo\Base\Utils::MultipleStreamWriter(
$oMessage->ToStream(true), array($rMessageStream), 8192, true, true, true);
if (false !== $iMessageStreamSize)
{
$this->smptSendMessage($oAccount, $oMessage, $rMessageStream);
if (\is_resource($rMessageStream))
{
@\fclose($rMessageStream);
}
$mResult = true;
$sReadReceiptFlag = $this->Config()->Get('labs', 'imap_read_receipt_flag', '');
if (!empty($sReadReceiptFlag))
{
$sFolderFullName = $this->GetActionParam('MessageFolder', '');
$sUid = $this->GetActionParam('MessageUid', '');
$this->Cacher()->Set($oAccount->Email().'/'.$sFolderFullName.'/'.$sUid, '1');
if (0 < \strlen($sFolderFullName) && 0 < \strlen($sUid))
{
try
{
$this->MailClient()->MessageSetFlag($sFolderFullName, array($sUid), true, $sReadReceiptFlag, true, true);
}
catch (\Exception $oException) {}
}
}
}
}
}
catch (\RainLoop\Exceptions\ClientException $oException)
{
throw $oException;
}
catch (\Exception $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage, $oException);
}
if (false === $mResult)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantSendMessage);
}
return $this->TrueResponse(__FUNCTION__);
}
/**
* @return array
*/
@ -5893,7 +6033,7 @@ class Actions
'ThreadsLen' => $mResponse->ThreadsLen(),
'ParentThread' => $mResponse->ParentThread(),
'Sensitivity' => $mResponse->Sensitivity(),
'ReadingConfirmation' => $mResponse->ReadingConfirmation()
'ReadReceipt' => ''
));
$oAttachments = $mResponse->Attachments();
@ -5932,12 +6072,15 @@ class Actions
// Flags
$aFlags = $mResponse->FlagsLowerCase();
$mResult['IsSeen'] = in_array('\\seen', $aFlags);
$mResult['IsFlagged'] = in_array('\\flagged', $aFlags);
$mResult['IsAnswered'] = in_array('\\answered', $aFlags);
$mResult['IsSeen'] = \in_array('\\seen', $aFlags);
$mResult['IsFlagged'] = \in_array('\\flagged', $aFlags);
$mResult['IsAnswered'] = \in_array('\\answered', $aFlags);
$sForwardedFlag = $oAccount ? strtolower($oAccount->Domain()->ForwardFlag()) : '';
$mResult['IsForwarded'] = 0 < strlen($sForwardedFlag) && in_array(strtolower($sForwardedFlag), $aFlags);
$sForwardedFlag = $this->Config()->Get('labs', 'imap_forwarded_flag', '');
$sReadReceiptFlag = $this->Config()->Get('labs', 'imap_read_receipt_flag', '');
$mResult['IsForwarded'] = 0 < \strlen($sForwardedFlag) && \in_array(\strtolower($sForwardedFlag), $aFlags);
$mResult['IsReadReceipt'] = 0 < \strlen($sReadReceiptFlag) && \in_array(\strtolower($sReadReceiptFlag), $aFlags);
if ('Message' === $sParent)
{
@ -5997,6 +6140,28 @@ class Actions
'FoundedCIDs' => $mFoundedCIDs,
'FoundedContentLocationUrls' => $mFoundedContentLocationUrls
)));
$mResult['ReadReceipt'] = $mResponse->ReadReceipt();
if (0 < \strlen($mResult['ReadReceipt']) && !$mResult['IsReadReceipt'])
{
if (0 < \strlen($mResult['ReadReceipt']))
{
try
{
$oReadReceipt = \MailSo\Mime\Email::Parse($mResult['ReadReceipt']);
if ($oReadReceipt && \strtolower($oAccount->Email()) === \strtolower($oReadReceipt->GetEmail()))
{
$mResult['ReadReceipt'] = '';
}
}
catch (\Exception $oException) {}
}
if (0 < \strlen($mResult['ReadReceipt']) && '1' === $this->Cacher()->Get($oAccount->Email().'/'.$mResult['Folder'].'/'.$mResult['Uid'], '0'))
{
$mResult['ReadReceipt'] = '';
}
}
}
}
else if ('MailSo\Mime\Email' === $sClassName)

View file

@ -219,6 +219,8 @@ Enables caching in the system'),
'use_imap_thread' => array(true),
'use_imap_move' => array(true),
'use_imap_auth_plain' => array(false),
'imap_forwarded_flag' => array('$Forwarded'),
'imap_read_receipt_flag' => array('$ReadReceipt'),
'autocreate_system_folders' => array(true),
'repo_type' => array('stable'),
'custom_repo' => array(''),

View file

@ -58,11 +58,6 @@ class Domain
*/
private $bOutAuth;
/**
* @var string
*/
private $sForwardFlag;
/**
* @var string
*/
@ -84,12 +79,10 @@ class Domain
* @param int $iOutSecure
* @param bool $bOutShortLogin
* @param bool $bOutAuth
* @param string $sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG
* @param string $sWhiteList = ''
*/
private function __construct($sName, $sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
$sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG, $sWhiteList = '')
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth, $sWhiteList = '')
{
$this->sName = $sName;
$this->sIncHost = $sIncHost;
@ -101,7 +94,6 @@ class Domain
$this->iOutSecure = $iOutSecure;
$this->bOutShortLogin = $bOutShortLogin;
$this->bOutAuth = $bOutAuth;
$this->sForwardFlag = $sForwardFlag;
$this->sWhiteList = \trim($sWhiteList);
$this->bDisabled = false;
}
@ -117,7 +109,6 @@ class Domain
* @param int $iOutSecure
* @param bool $bOutShortLogin
* @param bool $bOutAuth
* @param string $sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG
* @param string $sWhiteList = ''
*
* @return \RainLoop\Domain
@ -125,13 +116,12 @@ class Domain
public static function NewInstance($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
$sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG, $sWhiteList = '')
$sWhiteList = '')
{
return new self(
$sName,
return new self($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
$sForwardFlag, $sWhiteList);
$sWhiteList);
}
/**
@ -157,9 +147,6 @@ class Domain
!empty($aDomain['smpt_secure']) ? $aDomain['smpt_secure'] : '');
$bOutAuth = isset($aDomain['smpt_auth']) ? (bool) $aDomain['smpt_auth'] : true;
$sForwardFlag = isset($aDomain['imap_custom_forward_flag']) ?
(string) $aDomain['imap_custom_forward_flag'] : '';
$sWhiteList = (string) (isset($aDomain['white_list']) ? $aDomain['white_list'] : '');
$bIncShortLogin = isset($aDomain['imap_short_login']) ? (bool) $aDomain['imap_short_login'] : false;
@ -168,7 +155,7 @@ class Domain
$oDomain = self::NewInstance($sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
empty($sForwardFlag) ? \RainLoop\Domain::DEFAULT_FORWARDED_FLAG : $sForwardFlag, $sWhiteList);
$sWhiteList);
}
return $oDomain;
@ -262,7 +249,6 @@ class Domain
* @param int $iOutSecure
* @param bool $bOutShortLogin
* @param bool $bOutAuth
* @param string $sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG
* @param string $sWhiteList = ''
*
* @return \RainLoop\Domain
@ -270,7 +256,7 @@ class Domain
public function UpdateInstance(
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
$sForwardFlag = \RainLoop\Domain::DEFAULT_FORWARDED_FLAG, $sWhiteList = '')
$sWhiteList = '')
{
$this->sIncHost = $sIncHost;
$this->iIncPort = $iIncPort;
@ -281,7 +267,6 @@ class Domain
$this->iOutSecure = $iOutSecure;
$this->bOutShortLogin = $bOutShortLogin;
$this->bOutAuth = $bOutAuth;
$this->sForwardFlag = $sForwardFlag;
$this->sWhiteList = \trim($sWhiteList);
return $this;
@ -367,14 +352,6 @@ class Domain
return $this->bOutAuth;
}
/**
* @return string
*/
public function ForwardFlag()
{
return $this->sForwardFlag;
}
/**
* @return string
*/

View file

@ -135,7 +135,7 @@ class Domain extends \RainLoop\Providers\AbstractProvider
$oDomain->UpdateInstance(
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
\RainLoop\Domain::DEFAULT_FORWARDED_FLAG, $sWhiteList);
$sWhiteList);
}
}
else
@ -143,7 +143,7 @@ class Domain extends \RainLoop\Providers\AbstractProvider
$oDomain = \RainLoop\Domain::NewInstance(0 < strlen($sNameForTest) ? $sNameForTest : $sName,
$sIncHost, $iIncPort, $iIncSecure, $bIncShortLogin,
$sOutHost, $iOutPort, $iOutSecure, $bOutShortLogin, $bOutAuth,
\RainLoop\Domain::DEFAULT_FORWARDED_FLAG, $sWhiteList);
$sWhiteList);
}
}
}

View file

@ -182,6 +182,11 @@
&nbsp;&nbsp;
<span class="i18n text" data-i18n-text="MESSAGE/BUTTON_SHOW_IMAGES"></span>
</div>
<div class="readReceipt" data-bind="visible: message() && '' !== message().readReceipt() && !message().isReadReceipt(), click: function() { $root.readReceipt(message()); }">
<i class="icon-mail"></i>
&nbsp;&nbsp;
<span class="i18n text" data-i18n-text="MESSAGE/BUTTON_NOTIFY_READ_RECEIPT"></span>
</div>
<div class="attachmentsPlace" data-bind="visible: message() && message().hasVisibleAttachments()">
<ul class="attachmentList" data-bind="foreach: message() ? message().attachments() : []">
<li class="attachmentItem" draggable="true" data-bind="visible: !isLinked, title: fileName, event: { 'dragstart': eventDragStart }">

View file

@ -107,7 +107,22 @@
<span class="i18n" data-i18n-text="COMPOSE/ATTACH_DROP_FILES_DESC"></span>
</div>
<div class="pull-right">
<div class="btn-group">
<div class="btn-group pull-right">
<a class="btn dropdown-toggle buttonMore" data-placement="bottom" data-toggle="dropdown">
<i class="icon-list"></i>
</a>
<ul class="dropdown-menu g-ui-menu">
<li class="e-item" data-bind="click: function () { requestReadReceipt(!requestReadReceipt()); }">
<a class="e-link">
<i class="icon-checkbox-unchecked" data-bind="css: {'icon-checkbox-checked': requestReadReceipt(), 'icon-checkbox-unchecked': !requestReadReceipt() }"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="COMPOSE/BUTTON_REQUEST_READ_RECEIPT"></span>
</a>
</li>
</ul>
</div>
<div class="btn-group pull-right">&nbsp;</div>
<div class="btn-group pull-right">
<a class="btn" data-placement="top" data-bind="initDom: composeUploaderButton, tooltip: 'COMPOSE/ATTACH_FILES'">
<i class="icon-attachment"></i>
</a>

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Allen antworten"
BUTTON_FORWARD = "Weiterleiten"
BUTTON_FORWARD_AS_ATTACHMENT = "Als Anhang weiterleiten"
BUTTON_SHOW_IMAGES = "Bilder anzeigen"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "In neuem Fenster anzeigen"
MENU_HEADERS = "Kopfzeilen anzeigen"
MENU_VIEW_ORIGINAL = "Original anzeigen"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Anhänge"
MESSAGE_LOADING = "es wird geladen"
MESSAGE_VIEW_DESC = "Wählen Sie eine Nachricht aus der Liste aus um sie anzuzeigen."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Suche läuft..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Versandt"
FORWARD_MESSAGE_TOP_SUBJECT = "Thema"
EMPTY_TO_ERROR_DESC = "Geben Sie bitte mindestens einen Empfänger an"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Reply All"
BUTTON_FORWARD = "Forward"
BUTTON_FORWARD_AS_ATTACHMENT = "Forward as attachment"
BUTTON_SHOW_IMAGES = "Display external images"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "View in separate window"
MENU_HEADERS = "Show message headers"
MENU_VIEW_ORIGINAL = "Show original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Attachments"
MESSAGE_LOADING = "Loading"
MESSAGE_VIEW_DESC = "Select message in list to view it here."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Searching..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Sent"
FORWARD_MESSAGE_TOP_SUBJECT = "Subject"
EMPTY_TO_ERROR_DESC = "Please specify at least one recipient"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Responder Todos"
BUTTON_FORWARD = "Reenviar"
BUTTON_FORWARD_AS_ATTACHMENT = "Reenviar con adjuntos"
BUTTON_SHOW_IMAGES = "Mostrar imágenes"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Ver en una ventana nueva"
MENU_HEADERS = "Mostrar los encabezados del mensaje"
MENU_VIEW_ORIGINAL = "Mostrar original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Adjuntos"
MESSAGE_LOADING = "Cargando"
MESSAGE_VIEW_DESC = "Seleccione un mensaje en la lista para verlo aquí."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Buscando..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Enviado"
FORWARD_MESSAGE_TOP_SUBJECT = "Asunto"
EMPTY_TO_ERROR_DESC = "Por favor especifique al menos un destinatario"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Répondre à tous"
BUTTON_FORWARD = "Transférer"
BUTTON_FORWARD_AS_ATTACHMENT = "Transférer comme pièce-jointe"
BUTTON_SHOW_IMAGES = "Afficher les images"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Voir dans une nouvelle fenêtre"
MENU_HEADERS = "Voir les entêtes du message"
MENU_VIEW_ORIGINAL = "Voir le message original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Pièces jointes"
MESSAGE_LOADING = "Chargement"
MESSAGE_VIEW_DESC = "Sélectionner un message dans la liste pour l'afficher ici."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Recherche..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Envoyé"
FORWARD_MESSAGE_TOP_SUBJECT = "Sujet"
EMPTY_TO_ERROR_DESC = "Merci de spécifier au minimum un destinataire"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Svara öllum"
BUTTON_FORWARD = "Áframsenda"
BUTTON_FORWARD_AS_ATTACHMENT = "Áframsenda sem viðhengi"
BUTTON_SHOW_IMAGES = "Sýna myndir"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Skoða í öðrum glugga"
MENU_HEADERS = "Sýna bréfa hausa"
MENU_VIEW_ORIGINAL = "Sýna upprunalega"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Viðhengi"
MESSAGE_LOADING = "Hleð"
MESSAGE_VIEW_DESC = "Veldu bréf úr listanum til að skoða hér."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Leita..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Sent"
FORWARD_MESSAGE_TOP_SUBJECT = "Viðfangsefni"
EMPTY_TO_ERROR_DESC = "Vinsamlegast taktu fram að minnsta kosti einn viðtakanda"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "모두 답장"
BUTTON_FORWARD = "전달"
BUTTON_FORWARD_AS_ATTACHMENT = "첨부파일로 전달"
BUTTON_SHOW_IMAGES = "외부이미지 표시"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "분할화면에서 보기"
MENU_HEADERS = "메시지 헤더 보기"
MENU_VIEW_ORIGINAL = "원본 보기"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "첨부파일"
MESSAGE_LOADING = "여는 중..."
MESSAGE_VIEW_DESC = "목록에서 선택한 메시지가 여기에 표시됩니다."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "검색중..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "참조"
FORWARD_MESSAGE_TOP_SENT = "보냄"
FORWARD_MESSAGE_TOP_SUBJECT = "제목"
EMPTY_TO_ERROR_DESC = "수신인을 한 명 이상 선택하세요"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Atbildēt visiem"
BUTTON_FORWARD = "Pārsūtīt"
BUTTON_FORWARD_AS_ATTACHMENT = "Pārsūtīt kā pielikumu"
BUTTON_SHOW_IMAGES = "Rādīt attēlus"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Skatīt jaunā logā"
MENU_HEADERS = "Rādīt ziņojuma galveni"
MENU_VIEW_ORIGINAL = "Rādīt orģinālu"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Pielikumi"
MESSAGE_LOADING = "Lādējās"
MESSAGE_VIEW_DESC = "Izvēlaties ziņojumu no saraksta lai to apskatītu."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Meklē..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Nosūtīts"
FORWARD_MESSAGE_TOP_SUBJECT = "Tēma"
EMPTY_TO_ERROR_DESC = "Pievienojat vismaz vienu saņēmēju"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Allen beantwoorden"
BUTTON_FORWARD = "Doorsturen"
BUTTON_FORWARD_AS_ATTACHMENT = "Doorsturen als bijlage"
BUTTON_SHOW_IMAGES = "Toon afbeeldingen"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Toon in nieuw venster"
MENU_HEADERS = "Toon bericht hoofding"
MENU_VIEW_ORIGINAL = "Toon origineel"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Bijlages"
MESSAGE_LOADING = "Bericht ophalen"
MESSAGE_VIEW_DESC = "Selecteer het bericht in de lijst om hier te bekijken."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Zoeken..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Verzonden"
FORWARD_MESSAGE_TOP_SUBJECT = "Onderwerp"
EMPTY_TO_ERROR_DESC = "Gelieve minstens 1 ontvanger aan te duiden"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Svar alle"
BUTTON_FORWARD = "Frem"
BUTTON_FORWARD_AS_ATTACHMENT = "Videresend som vedlegg"
BUTTON_SHOW_IMAGES = "Vis eksterne bilder"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Vis i eget vindu"
MENU_HEADERS = "Vis meldingshoder"
MENU_VIEW_ORIGINAL = "Vis original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Vedlegg"
MESSAGE_LOADING = "Laster"
MESSAGE_VIEW_DESC = "Velg melding på listen for å vise det her ."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Søker ..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Sendt"
FORWARD_MESSAGE_TOP_SUBJECT = "Emne"
EMPTY_TO_ERROR_DESC = "Vennligst oppgi minst én mottaker"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Ja"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Odpowiedz wszystkim"
BUTTON_FORWARD = "Przekaż dalej"
BUTTON_FORWARD_AS_ATTACHMENT = "Przekaż jako załącznik"
BUTTON_SHOW_IMAGES = "Wyświetl obrazy poniżej"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Wyświetl w osobnym oknie"
MENU_HEADERS = "Pokaż nagłówek wiadomości"
MENU_VIEW_ORIGINAL = "Pokaż oryginał"
@ -179,6 +180,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Wysłany"
FORWARD_MESSAGE_TOP_SUBJECT = "Temat"
EMPTY_TO_ERROR_DESC = "Wprowadź co najmniej jednego odbiorcę"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Responder a todos"
BUTTON_FORWARD = "Enviar"
BUTTON_FORWARD_AS_ATTACHMENT = "Enviar como anexo"
BUTTON_SHOW_IMAGES = "Exibir Imagens"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Ver em janela separada"
MENU_HEADERS = "Mostrar título das mensagens"
MENU_VIEW_ORIGINAL = "Mostrar original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Anexos"
MESSAGE_LOADING = "Carregando"
MESSAGE_VIEW_DESC = "Selecione a lista de mensagens para visuzalizá-la aqui."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Procurando..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Enviar"
FORWARD_MESSAGE_TOP_SUBJECT = "Assunto"
EMPTY_TO_ERROR_DESC = "Por favor, especifique pelo menos um destinatário"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Responder a todos"
BUTTON_FORWARD = "Enviar"
BUTTON_FORWARD_AS_ATTACHMENT = "Enviar como anexo"
BUTTON_SHOW_IMAGES = "Exibir Imagens"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "Ver em janela separada"
MENU_HEADERS = "Mostrar título das mensagens"
MENU_VIEW_ORIGINAL = "Mostrar original"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Anexos"
MESSAGE_LOADING = "Carregando"
MESSAGE_VIEW_DESC = "Selecione a lista de mensagens para visuzalizá-la aqui."
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "Procurando..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "CC"
FORWARD_MESSAGE_TOP_SENT = "Enviar"
FORWARD_MESSAGE_TOP_SUBJECT = "Assunto"
EMPTY_TO_ERROR_DESC = "Por favor, especifique pelo menos um destinatário"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "Ответить Всем"
BUTTON_FORWARD = "Переслать"
BUTTON_FORWARD_AS_ATTACHMENT = "Переслать как файл"
BUTTON_SHOW_IMAGES = "Показать внешние изображения в письме"
BUTTON_NOTIFY_READ_RECEIPT = "Уведомить отправителя о прочтении этого сообщения."
BUTTON_IN_NEW_WINDOW = "В отдельном окне"
MENU_HEADERS = "Просмотреть заголовки"
MENU_VIEW_ORIGINAL = "Просмотреть оригинал"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "Файлы"
MESSAGE_LOADING = "Загрузка"
MESSAGE_VIEW_DESC = "Выберите сообщение для просмотра."
[READ_RECEIPT]
SUBJECT = "Уведомление о прочтении письма - %SUBJECT%"
BODY = "Это уведомление о прочтении для сообщения, которое вы отправили в адрес %READ-RECEIPT%.
Примечание: Это уведомление о прочтении означает лишь то, что сообщение было отображено на машине получателя.
Оно не гарантирует того, что получатель прочёл или понял содержимое сообщения."
[SUGGESTIONS]
SEARCHING_DESC = "Поиск..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "Копия"
FORWARD_MESSAGE_TOP_SENT = "Отправлено"
FORWARD_MESSAGE_TOP_SUBJECT = "Тема"
EMPTY_TO_ERROR_DESC = "Укажите как минимум одного получателя"
BUTTON_REQUEST_READ_RECEIPT = "Запрос о прочтении письма"
[POPUPS_ASK]
BUTTON_YES = "Да"

View file

@ -100,6 +100,7 @@ BUTTON_REPLY_ALL = "全部回复"
BUTTON_FORWARD = "转发"
BUTTON_FORWARD_AS_ATTACHMENT = "带附件转发"
BUTTON_SHOW_IMAGES = "显示外部图片"
BUTTON_NOTIFY_READ_RECEIPT = "The sender has asked to be notified when you read this message."
BUTTON_IN_NEW_WINDOW = "在新窗口中查看"
MENU_HEADERS = "显示详细信息"
MENU_VIEW_ORIGINAL = "显示原始内容"
@ -125,6 +126,13 @@ PRINT_LABEL_ATTACHMENTS = "附件"
MESSAGE_LOADING = "加载中"
MESSAGE_VIEW_DESC = "在此查看列表中选中的邮件。"
[READ_RECEIPT]
SUBJECT = "Return Receipt (displayed) - %SUBJECT%"
BODY = "This is a Return Receipt for the mail that you sent to %READ-RECEIPT%.
Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer.
There is no guarantee that the recipient has read or understood the message contents."
[SUGGESTIONS]
SEARCHING_DESC = "搜索中..."
@ -179,6 +187,7 @@ FORWARD_MESSAGE_TOP_CC = "抄送"
FORWARD_MESSAGE_TOP_SENT = "发送"
FORWARD_MESSAGE_TOP_SUBJECT = "主题"
EMPTY_TO_ERROR_DESC = "请至少选择一位接收人"
BUTTON_REQUEST_READ_RECEIPT = "Request a read receipt"
[POPUPS_ASK]
BUTTON_YES = "Yes"

View file

@ -6880,10 +6880,10 @@ html.rl-no-preview-pane .messageList.message-selected {
cursor: pointer;
cursor: move;
}
html.rl-no-preview-pane .messageView {
showImages html.rl-no-preview-pane .messageView {
display: none;
}
html.rl-no-preview-pane .messageView.message-selected {
showImages html.rl-no-preview-pane .messageView.message-selected {
display: block;
}
.messageView {
@ -7049,11 +7049,15 @@ html.rl-no-preview-pane .messageView.message-selected {
.messageView .b-content .messageItem .line-loading {
height: 0px;
}
.messageView .b-content .messageItem .showImages {
.messageView .b-content .messageItem .showImages,
.messageView .b-content .messageItem .readReceipt {
cursor: pointer;
background-color: #eee;
padding: 10px 15px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ddd;
background-color: #eee;
}
.messageView .b-content .messageItem .readReceipt {
background-color: #ffffd9;
}
.messageView .b-content .messageItem .attachmentsPlace {
padding: 10px;

File diff suppressed because one or more lines are too long

View file

@ -6322,6 +6322,7 @@ function MessageModel()
this.flagged = ko.observable(false);
this.answered = ko.observable(false);
this.forwarded = ko.observable(false);
this.isReadReceipt = ko.observable(false);
this.selected = ko.observable(false);
this.checked = ko.observable(false);
@ -6377,6 +6378,8 @@ function MessageModel()
this.attachments = ko.observableArray([]);
this.priority = ko.observable(Enums.MessagePriority.Normal);
this.readReceipt = ko.observable('');
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
@ -6530,6 +6533,7 @@ MessageModel.prototype.clear = function ()
this.flagged(false);
this.answered(false);
this.forwarded(false);
this.isReadReceipt(false);
this.selected(false);
this.checked(false);
@ -6543,6 +6547,7 @@ MessageModel.prototype.clear = function ()
this.attachments([]);
this.priority(Enums.MessagePriority.Normal);
this.readReceipt('');
this.aDraftInfo = [];
this.sMessageId = '';
this.sInReplyTo = '';
@ -6558,6 +6563,17 @@ MessageModel.prototype.clear = function ()
this.lastInCollapsedThreadLoading(false);
};
MessageModel.prototype.computeSenderEmail = function ()
{
var
sSent = RL.data().sentFolder(),
sDraft = RL.data().draftFolder()
;
this.senderEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
this.toEmailsString() : this.fromEmailString());
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}
@ -6602,17 +6618,6 @@ MessageModel.prototype.initByJson = function (oJsonMessage)
return bResult;
};
MessageModel.prototype.computeSenderEmail = function ()
{
var
sSent = RL.data().sentFolder(),
sDraft = RL.data().draftFolder()
;
this.senderEmailsString(this.folderFullNameRaw === sSent || this.folderFullNameRaw === sDraft ?
this.toEmailsString() : this.fromEmailString());
};
/**
* @param {AjaxJsonMessage} oJsonMessage
* @return {boolean}
@ -6642,6 +6647,8 @@ MessageModel.prototype.initUpdateByMessageJson = function (oJsonMessage)
this.foundedCIDs = Utils.isArray(oJsonMessage.FoundedCIDs) ? oJsonMessage.FoundedCIDs : [];
this.attachments(this.initAttachmentsFromJson(oJsonMessage.Attachments));
this.readReceipt(oJsonMessage.ReadReceipt || '');
this.computeSenderEmail();
bResult = true;
@ -6699,6 +6706,7 @@ MessageModel.prototype.initFlagsByJson = function (oJsonMessage)
this.flagged(!!oJsonMessage.IsFlagged);
this.answered(!!oJsonMessage.IsAnswered);
this.forwarded(!!oJsonMessage.IsForwarded);
this.isReadReceipt(!!oJsonMessage.IsReadReceipt);
bResult = true;
}
@ -7079,6 +7087,7 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
this.flagged(oMessage.flagged());
this.answered(oMessage.answered());
this.forwarded(oMessage.forwarded());
this.isReadReceipt(oMessage.isReadReceipt());
this.selected(oMessage.selected());
this.checked(oMessage.checked());
@ -8015,6 +8024,8 @@ function PopupsComposeViewModel()
this.replyTo = ko.observable('');
this.subject = ko.observable('');
this.requestReadReceipt = ko.observable(false);
this.sendError = ko.observable(false);
this.sendSuccessButSaveError = ko.observable(false);
this.savedError = ko.observable(false);
@ -8271,7 +8282,8 @@ function PopupsComposeViewModel()
this.prepearAttachmentsForSendOrSave(),
this.aDraftInfo,
this.sInReplyTo,
this.sReferences
this.sReferences,
this.requestReadReceipt()
);
}
}
@ -9335,6 +9347,8 @@ PopupsComposeViewModel.prototype.reset = function ()
this.replyTo('');
this.subject('');
this.requestReadReceipt(false);
this.aDraftInfo = null;
this.sInReplyTo = '';
this.bFromDraft = false;
@ -12027,11 +12041,6 @@ function MailBoxMessageViewViewModel()
this.viewDate = ko.observable('');
this.viewMoment = ko.observable('');
this.viewLineAsCcc = ko.observable('');
this.viewHasImages = ko.observable(false);
this.viewHasVisibleAttachments = ko.observable(false);
this.viewAttachments = ko.observableArray([]);
this.viewIsHtml = ko.observable(false);
this.viewIsRtl = ko.observable(false);
this.viewViewLink = ko.observable('');
this.viewDownloadLink = ko.observable('');
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
@ -12053,11 +12062,6 @@ function MailBoxMessageViewViewModel()
this.viewDate(oMessage.fullFormatDateValue());
this.viewMoment(oMessage.momentDate());
this.viewLineAsCcc(oMessage.lineAsCcc());
this.viewHasImages(oMessage.hasImages());
this.viewHasVisibleAttachments(oMessage.hasVisibleAttachments());
this.viewAttachments(oMessage.attachments());
this.viewIsHtml(oMessage.isHtml());
this.viewIsRtl(oMessage.isRtl());
this.viewViewLink(oMessage.viewLink());
this.viewDownloadLink(oMessage.downloadLink());
@ -12287,6 +12291,25 @@ MailBoxMessageViewViewModel.prototype.showImages = function (oMessage)
}
};
/**
* @param {MessageModel} oMessage
*/
MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
{
if (oMessage && '' !== oMessage.readReceipt())
{
RL.remote().sendReadReceiptMessage(Utils.emptyFunction, oMessage.folderFullNameRaw, oMessage.uid,
oMessage.readReceipt(),
Utils.i18n('READ_RECEIPT/SUBJECT', {'SUBJECT': oMessage.subject()}),
Utils.i18n('READ_RECEIPT/BODY', {'READ-RECEIPT': oMessage.readReceipt()}));
oMessage.isReadReceipt(true);
RL.cache().storeMessageFlagsToCache(oMessage);
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};
/**
* @param {?} oScreen
*
@ -14964,6 +14987,26 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
}, Consts.Defaults.SaveMessageAjaxTimeout);
};
/**
* @param {?Function} fCallback
* @param {string} sMessageFolder
* @param {string} sMessageUid
* @param {string} sReadReceipt
* @param {string} sSubject
* @param {string} sText
*/
WebMailAjaxRemoteStorage.prototype.sendReadReceiptMessage = function (fCallback, sMessageFolder, sMessageUid, sReadReceipt, sSubject, sText)
{
this.defaultRequest(fCallback, 'SendReadReceiptMessage', {
'MessageFolder': sMessageFolder,
'MessageUid': sMessageUid,
'ReadReceipt': sReadReceipt,
'Subject': sSubject,
'Text': sText
});
};
/**
* @param {?Function} fCallback
* @param {string} sMessageFolder
@ -14980,9 +15023,10 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
* @param {(Array|null)} aDraftInfo
* @param {string} sInReplyTo
* @param {string} sReferences
* @param {boolean} bRequestReadReceipt
*/
WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFolder, sMessageUid, sSentFolder,
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences)
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences, bRequestReadReceipt)
{
this.defaultRequest(fCallback, 'SendMessage', {
'MessageFolder': sMessageFolder,
@ -14998,6 +15042,7 @@ WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFo
'DraftInfo': aDraftInfo,
'InReplyTo': sInReplyTo,
'References': sReferences,
'ReadReceiptRequest': bRequestReadReceipt ? '1' : '0',
'Attachments': aAttachments
}, Consts.Defaults.SendMessageAjaxTimeout);
};
@ -15609,12 +15654,13 @@ WebMailCacheStorage.prototype.initMessageFlagsFromCache = function (oMessage)
mFlaggedSubUid = null
;
if (aFlags && 4 === aFlags.length)
if (aFlags && 5 === aFlags.length)
{
oMessage.unseen(aFlags[0]);
oMessage.flagged(aFlags[1]);
oMessage.answered(aFlags[2]);
oMessage.forwarded(aFlags[3]);
oMessage.isReadReceipt(aFlags[4]);
}
if (0 < oMessage.threads().length)
@ -15645,7 +15691,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCache = function (oMessage)
this.setMessageFlagsToCache(
oMessage.folderFullNameRaw,
oMessage.uid,
[oMessage.unseen(), oMessage.flagged(), oMessage.answered(), oMessage.forwarded()]
[oMessage.unseen(), oMessage.flagged(), oMessage.answered(), oMessage.forwarded(), oMessage.isReadReceipt()]
);
}
};
@ -16671,7 +16717,7 @@ RainLoopApp.prototype.folderInformation = function (sFolder, aList)
bCheck = true;
oFlags = oData.Result.Flags[sUid];
RL.cache().storeMessageFlagsToCacheByFolderAndUid(oFolder.fullNameRaw, sUid.toString(), [
!oFlags['IsSeen'], !!oFlags['IsFlagged'], !!oFlags['IsAnswered'], !!oFlags['IsForwarded']
!oFlags['IsSeen'], !!oFlags['IsFlagged'], !!oFlags['IsAnswered'], !!oFlags['IsForwarded'], !!oFlags['IsReadReceipt']
]);
}
}

File diff suppressed because one or more lines are too long