Bug 167815 Compose mail to context menu in message header always brings up plain text compose r=cavin sr=sspitzer a=asa

This commit is contained in:
neil%parkwaycc.co.uk 2003-01-30 09:38:38 +00:00
Родитель ff35f92d2d
Коммит ba000a51f0
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -785,11 +785,15 @@ function AddNodeToAddressBook (emailAddressNode)
// with that address
function SendMailToNode(emailAddressNode)
{
if (emailAddressNode)
var fields = Components.classes["@mozilla.org/messengercompose/composefields;1"].createInstance(Components.interfaces.nsIMsgCompFields);
var params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams);
if (emailAddressNode && fields && params)
{
var emailAddress = emailAddressNode.getAttribute("emailAddress");
if (emailAddress)
messenger.OpenURL("mailto:" + emailAddress );
fields.to = emailAddressNode.getAttribute("label");
params.type = Components.interfaces.nsIMsgCompType.New;
params.format = Components.interfaces.nsIMsgCompFormat.Default;
params.composeFields = fields;
msgComposeService.OpenComposeWindowWithParams(null, params);
}
}