зеркало из https://github.com/mozilla/pjs.git
Fixing bug 4198. This fix allows ISPs to add a customized signature file to their user mail accounts. r=ducarroz, sr=sspitzer
This commit is contained in:
Родитель
ecad6fb52c
Коммит
efb0ac4b41
|
@ -76,7 +76,7 @@ var smtpService;
|
|||
var am;
|
||||
var accountm = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
|
||||
var gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
var gMailSession = Components.classes["@mozilla.org/messenger/services/session;1"].getService(Components.interfaces.nsIMsgMailSession);
|
||||
var accounts = accountm.accounts;
|
||||
|
||||
//accountCount indicates presence or absense of accounts
|
||||
|
@ -455,6 +455,22 @@ function finishAccount(account, accountData) {
|
|||
destIdentity.valid=true;
|
||||
}
|
||||
|
||||
/**
|
||||
* If signature file need to be set, get the path to the signature file.
|
||||
* Signature files, if exist, are placed under default location. Get
|
||||
* default files location for messenger using directory service. Signature
|
||||
* file name should be extracted from the account data to build the complete
|
||||
* path for signature file. Once the path is built, set the identity's signature pref.
|
||||
*/
|
||||
if (destIdentity.attachSignature)
|
||||
{
|
||||
var sigFileName = accountData.signatureFileName;
|
||||
|
||||
var sigFile = gMailSession.getDataFilesDir("messenger");
|
||||
sigFile.appendUnicode(sigFileName);
|
||||
destIdentity.signature = sigFile;
|
||||
}
|
||||
|
||||
// don't try to create an smtp server if we already have one.
|
||||
if (!destIdentity.smtpServerKey)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче