mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Added: DKIM status
This commit is contained in:
parent
c6db99d53b
commit
9bc977cccf
10 changed files with 239 additions and 7 deletions
|
|
@ -10,13 +10,15 @@
|
|||
/**
|
||||
* @param {string=} sEmail
|
||||
* @param {string=} sName
|
||||
* @param {string=} sDkimStatus
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
function EmailModel(sEmail, sName)
|
||||
function EmailModel(sEmail, sName, sDkimStatus)
|
||||
{
|
||||
this.email = sEmail || '';
|
||||
this.name = sName || '';
|
||||
this.dkimStatus = sDkimStatus || 'none';
|
||||
|
||||
this.clearDuplicateName();
|
||||
}
|
||||
|
|
@ -42,10 +44,16 @@
|
|||
*/
|
||||
EmailModel.prototype.email = '';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
EmailModel.prototype.dkimStatus = 'none';
|
||||
|
||||
EmailModel.prototype.clear = function ()
|
||||
{
|
||||
this.email = '';
|
||||
this.name = '';
|
||||
this.dkimStatus = 'none';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -121,6 +129,7 @@
|
|||
{
|
||||
this.name = Utils.trim(oJsonEmail.Name);
|
||||
this.email = Utils.trim(oJsonEmail.Email);
|
||||
this.dkimStatus = Utils.trim(oJsonEmail.DkimStatus || '');
|
||||
|
||||
bResult = '' !== this.email;
|
||||
this.clearDuplicateName();
|
||||
|
|
|
|||
|
|
@ -563,6 +563,21 @@
|
|||
return MessageModel.emailsToLine(this.from, bFriendlyView, bWrapWithLink);
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
MessageModel.prototype.fromDkimData = function ()
|
||||
{
|
||||
var aResult = ['none', ''];
|
||||
if (Utils.isNonEmptyArray(this.from) && 1 === this.from.length &&
|
||||
this.from[0] && this.from[0].dkimStatus)
|
||||
{
|
||||
aResult = [this.from[0].dkimStatus, this.from[0].email];
|
||||
}
|
||||
|
||||
return aResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {boolean} bFriendlyView
|
||||
* @param {boolean=} bWrapWithLink = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue