rem: if(Event.method == 0) Event.method = Event.ICAL_METHOD_PUBLISH; 
add: Event.alarm = false;  if(Event.method == 0) Event.method = Event.ICAL_METHOD_PUBLISH; 
context: function sendEvent(){	var Event;	var CalendarDataFilePath;	var nsIMsgCompFieldsComponent;	var nsIMsgCompFields;	var nsIMsgComposeParamsComponent;	var nsIMsgComposeParams;	var nsIMsgComposeServiceComponent;	var nsIMsgComposeService;	var nsIMsgCompFormat;	var nsIMsgCompType;	var nsIMsgAttachmentComponent;	var nsIMsgAttachment;	Event = gCalendarWindow.EventSelection.selectedEvents[0].clone();	CalendarDataFilePath = getCalendarDataFilePath();	if (! CalendarDataFilePath)	{		return;	}	/* Want output like	 * When: Thursday, November 09, 2000 11:00 PM-11:30 PM (GMT-08:00) Pacific Time     * (US & Canada); Tijuana.     * Where: San Francisco	 * see bug 59630	 */	if (Event)	{		// lets open a composer with fields and body prefilled		try		{                        if(Event.method == 0)                            Event.method = Event.ICAL_METHOD_PUBLISH;			saveCalendarObject(CalendarDataFilePath, Event.getIcalString());			nsIMsgAttachmentComponent = Components.classes["@mozilla.org/messengercompose/attachment;1"];			nsIMsgAttachment = nsIMsgAttachmentComponent.createInstance(Components.interfaces.nsIMsgAttachment);			nsIMsgAttachment.name = "iCal Event"			nsIMsgAttachment.contentType = "text/calendar;"			nsIMsgAttachment.temporary = true;			nsIMsgAttachment.url = "file://" + CalendarDataFilePath;			// lets setup the fields for the message			nsIMsgCompFieldsComponent = Components.classes["@mozilla.org/messengercompose/composefields;1"];			nsIMsgCompFields = nsIMsgCompFieldsComponent.createInstance(Components.interfaces.nsIMsgCompFields);			nsIMsgCompFields.useMultipartAlternative = true;			nsIMsgCompFields.attachVCard = true;			nsIMsgCompFields.from = gMailIdentity.email;			nsIMsgCompFields.replyTo = gMailIdentity.replyTo;			nsIMsgCompFields.subject = Event.title;			nsIMsgCompFields.organization = gMailIdentity.organization;			nsIMsgCompFields.body = "When: " + Event.start + "-" + Event.end + "\nWhere: " + Event.location + "\nOrganizer: " + gMailIdentity.fullName + " <" + gMailIdentity.email + ">" + "\nSummary:" + Event.description;			nsIMsgCompFields.addAttachment(nsIMsgAttachment);			/* later on we may be able to add:			 * returnReceipt, attachVCard			 */			// time to handle the message paramaters			nsIMsgComposeParamsComponent = Components.classes["@mozilla.org/messengercompose/composeparams;1"];			nsIMsgComposeParams = nsIMsgComposeParamsComponent.createInstance(Components.interfaces.nsIMsgComposeParams);			nsIMsgComposeParams.composeFields = nsIMsgCompFields;			nsIMsgCompFormat = Components.interfaces.nsIMsgCompFormat;			nsIMsgCompType = Components.interfaces.nsIMsgCompType;			nsIMsgComposeParams.format = nsIMsgCompFormat.PlainText; // this could be a pref for the user			nsIMsgComposeParams.type = nsIMsgCompType.New;			// finally lets pop open a composer window after all this work :)			nsIMsgComposeServiceComponent = Components.classes["@mozilla.org/messengercompose;1"];			nsIMsgComposeService = nsIMsgComposeServiceComponent.getService().QueryInterface(Components.interfaces.nsIMsgComposeService);			nsIMsgComposeService.OpenComposeWindowWithParams(null, nsIMsgComposeParams);		}		catch(ex)		{			mdebug("failed to get composer window\nex: " + ex);		}	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2e60546546c429c0ac3d145a48b5053fbee9b622/calendarMail.js/clean/calendar/resources/content/calendarMail.js