nsIMsgIdentity 编辑

The nsIMsgIdentity interface contains all the personal outgoing mail information for a given person. Each identity is identified by a key, which is the id string in the identity preferences, such as in mail.identity.<id>.replyTo.

Inherits from: nsISupports

Method overview

void clearAllValues();
void copy(in nsIMsgIdentity identity);
AString getUnicharAttribute(in string name);
void setUnicharAttribute(in string name, in AString value);
ACString getCharAttribute(in string name);
void setCharAttribute(in string name, in ACString value);
boolean getBoolAttribute(in string name);
void setBoolAttribute(in string name, in boolean value);
long getIntAttribute(in string name);
void setIntAttribute(in string name, in long value);
AString toString();

Attributes

AttributeTypeDescription
identityNameAString 
fullNameAStringUser's full name, i.e. John Doe
emailAStringUser's e-mail address, i.e. john@doe.com
replyToAStringOptional replyTo address, i.e. johnNOSPAM@doe.com
organizationAStringOptional organization
composeHtmlbooleanShould we compose with HTML by default?
attachSignaturebooleanShould we attach a signature by default?
attachVCardbooleanShould we attach a vCard by default?
autoQuotebooleanShould we automatically quote the original message?
replyOnToplongShould replies appear above or below the quoted message. (1 - replies appear above the quoted message. 0 - replies appear below the quoted message.
sigBottombooleanWhat should our signature be at the end of the quoted text when replying above it?
signaturensILocalFileThe file containing the current signature.
signatureDatelong 
escapedVCardAString 
doFccboolean 
fccFolderAString 
fccFolderPickerModeAString 
fccReplyFollowsParentboolean 
draftsFolderPickerModeAString 
tmplFolderPickerModeAString 
bccSelfbooleanNote: Don't call bccSelf, bccOthers, and bccList directly, they are only used for migration and backward compatability. Use doBcc and doBccList instead.
bccOthersboolean 
bccListAString 
doBccboolean 
doBccListAString 
draftFolderAString 
stationeryFolderAString 
showSaveMsgDlgboolean 
directoryServerAString 
overrideGlobalPrefboolean 
autocompleteToMyDomainbooleanIf this is false, don't append the user's domain to an autocomplete address with no matches.
validbooleanDetermines if the UI should use this identity and the wizard uses this to determine whether or not to ask the user to complete all the fields.
smtpServerKeyAStringThe preferred SMTP server for this identity. If this is set, this is the SMTP server that should be used for the message send.
requestReturnReceiptbooleanReadonly: Default request for return receipt option for this identity. If this is set, the Return Receipt menu item on the compose window will be checked.
receiptHeaderTypelongReadonly:
requestDSNbooleanReadonly: Default request for DSN option for this identity. If this is set, the DSN menu item on the compose window will be checked.

Methods

clearAllValues()

Note: This is really dangerous! This destroys all pref values; do not call this unless you know what you're doing!
 void clearAllValues();
Parameters

None.

copy()

Copy the attributes of the identity we pass in.

 void copy(in nsIMsgIdentity identity);
Parameters
identity

getUnicharAttribute()

Getter for Unicode attributes.

Note: These attributes persist across sessions.
 AString getUnicharAttribute(in string name);
Parameters
name

setUnicharAttribute()

Setter for Unicode attributes.

 void setUnicharAttribute(in string name, in AString value);
Parameters
name
Name of the attribute to set.
value
Value to set the attribute to.

getCharAttribute()

Getter for char attributes.

 ACString getCharAttribute(in string name);
Parameters
name
Name of the attribute to get.

setCharAttribute()

Setter for char attributes.

 void setCharAttribute(in string name, in ACString value);
Parameters
name
Name of the attribute to set.
value
Value to set the attribute to.

getBoolAttribute()

Getter for boolean attributes.

 boolean getBoolAttribute(in string name);
Parameters
name
Name of the attribute to get.

setBoolAttribute()

Setter for boolean attributes.

 void setBoolAttribute(in string name, in boolean value);
Parameters
name
Name of the attribute to set.
value
Value to set the attribute to.

getIntAttribute()

Getter for int attributes.

 long getIntAttribute(in string name);
Parameters
name
Name of the attribute to get.

setIntAttribute()

Getter for int attributes.

 void setIntAttribute(in string name, in long value);
Parameters
name
Name of the attribute to set.
value
Value to set the attribute to.

toString()

Converts the nsIMsgIdentity to a string. Useful for debugging.

 AString toString();

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:69 次

字数:12211

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文