Bug 984119 - When creating e-mails from event dialog/summary dialog sender identity is preset with standard mail user. r=philipp

This commit is contained in:
MakeMyDay 2014-03-22 13:14:26 +01:00
Родитель b000df5dd7
Коммит 3ef4d3884e
5 изменённых файлов: 10 добавлений и 6 удалений

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

@ -435,7 +435,8 @@ calMailButtonDNDObserver.prototype = {
}
}
sendMailTo(recipients, item.title, item.getProperty("DESCRIPTION"));
let identity = item.calendar.getProperty("imip.identity");
sendMailTo(recipients, item.title, item.getProperty("DESCRIPTION"), identity);
}
},

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

@ -231,7 +231,8 @@ function sendMailToOrganizer() {
"emailSubjectReply",
[item.title]);
sendMailTo(email, emailSubject);
let identity = item.calendar.getProperty("imip.identity");
sendMailTo(email, emailSubject, null, identity);
}
}
}

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

@ -3609,8 +3609,8 @@ function sendMailToAttendees(aAttendees) {
var emailSubject = calGetString("calendar-event-dialog",
"emailSubjectReply",
[item.title]);
sendMailTo(toList, emailSubject);
let identity = window.calendarItem.calendar.getProperty("imip.identity");
sendMailTo(toList, emailSubject, null, identity);
}
/**

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

@ -372,7 +372,8 @@ function sendMailToOrganizer() {
"emailSubjectReply",
[item.title]);
sendMailTo(email, emailSubject);
let identity = item.calendar.getProperty("imip.identity");
sendMailTo(email, emailSubject, null, identity);
}
}
}

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

@ -1233,7 +1233,7 @@ calListenerBag.prototype = {
}
};
function sendMailTo(aRecipient, aSubject, aBody) {
function sendMailTo(aRecipient, aSubject, aBody, aIdentity) {
let msgParams = Components.classes["@mozilla.org/messengercompose/composeparams;1"]
.createInstance(Components.interfaces.nsIMsgComposeParams);
let composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"]
@ -1246,6 +1246,7 @@ function sendMailTo(aRecipient, aSubject, aBody) {
msgParams.type = Components.interfaces.nsIMsgCompType.New;
msgParams.format = Components.interfaces.nsIMsgCompFormat.Default;
msgParams.composeFields = composeFields;
msgParams.identity = aIdentity;
MailServices.compose.OpenComposeWindowWithParams(null, msgParams);
}