pMsgSendLater->SetMsgWindow(aMsgWindow); mSendingUnsentMsgs = PR_TRUE;  pMsgSendLater->SendUnsentMessages(aIdentity);
NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv); if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIMsgIdentity> identity; rv = mailSession->GetCurrentIdentity(getter_AddRefs(identity)); if (NS_FAILED(rv)) return rv;  pMsgSendLater->SendUnsentMessages(identity, nsnull);
nsMessenger::SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow){    nsresult rv;    nsCOMPtr<nsIMsgSendLater> pMsgSendLater;     rv = nsComponentManager::CreateInstance(kMsgSendLaterCID, NULL,NS_GET_IID(nsIMsgSendLater),																				    (void **)getter_AddRefs(pMsgSendLater));     if (NS_SUCCEEDED(rv) && pMsgSendLater)     { #ifdef DEBUG        printf("We succesfully obtained a nsIMsgSendLater interface....\n"); #endif    SendLaterListener *sendLaterListener = new SendLaterListener(this);    if (!sendLaterListener)      return NS_ERROR_OUT_OF_MEMORY;    NS_ADDREF(sendLaterListener);    pMsgSendLater->AddListener(sendLaterListener);    pMsgSendLater->SetMsgWindow(aMsgWindow);    mSendingUnsentMsgs = PR_TRUE;     pMsgSendLater->SendUnsentMessages(aIdentity);     NS_RELEASE(sendLaterListener);	} 	return NS_OK;}