Mozilla/mozilla/mailnews/compose/build/nsMsgCompFactory.cpp
sspitzer%netscape.com 5839aa32bc fix for #17956 and #18084.
#17956 is reply fails if message in local mail folder

fix (by ducarroz) is to remove the temporary code.

#18084 is sending email fails in certain cases

the problem is we were sending the wrong info to the SMTP server.
when we sent "MAIL FROM: <address>" to the SMTP server we sent
the smtp username and not the full name built from the identity.
most of the changes are to support passing the identity around.
I also added code so that the smtp username is used on the mailto url spec.
we'll need that later, when we support multiple smtp servers and ESMTP.

r=alecf

a=chofmann


git-svn-id: svn://10.0.0.236/trunk@52980 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-09 02:04:06 +00:00

91 lines
3.3 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "msgCore.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h"
#include "nsIServiceManager.h"
#include "nsIModule.h"
#include "pratom.h"
#include "nsMsgCompCID.h"
/* Include all of the interfaces our factory can generate components for */
#include "nsMsgSendFact.h"
#include "nsMsgCompFieldsFact.h"
#include "nsMsgSendLaterFact.h"
#include "nsMsgComposeFact.h"
#include "nsMsgSendLater.h"
#include "nsSmtpUrl.h"
#include "nsISmtpService.h"
#include "nsSmtpService.h"
#include "nsMsgComposeService.h"
#include "nsMsgCompose.h"
#include "nsMsgSend.h"
#include "nsMsgQuote.h"
#include "nsIMsgDraft.h"
#include "nsMsgCreate.h" // For drafts...I know, awful file name...
#include "nsSmtpServer.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSmtpService);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSmtpServer);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgCompose);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgCompFields);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgComposeAndSend);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSendLater);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgDraft)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgComposeService);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgQuote);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgQuoteListener);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSmtpUrl);
////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////
static nsModuleComponentInfo components[] =
{
{ NS_MSGCOMPOSE_CID, &nsMsgComposeConstructor, NS_MSGCOMPOSE_PROGID, },
{ NS_MSGCOMPOSESERVICE_CID, &nsMsgComposeServiceConstructor, NS_MSGCOMPOSESERVICE_PROGID, },
{ NS_MSGCOMPFIELDS_CID, &nsMsgCompFieldsConstructor, NS_MSGCOMPFIELDS_PROGID, },
{ NS_MSGDRAFT_CID, &nsMsgDraftConstructor, NS_MSGDRAFT_PROGID, },
{ NS_MSGSEND_CID, &nsMsgComposeAndSendConstructor, NS_MSGSEND_PROGID, },
{ NS_MSGSENDLATER_CID, &nsMsgSendLaterConstructor, NS_MSGSENDLATER_PROGID, },
{ NS_SMTPSERVICE_CID, &nsSmtpServiceConstructor, NS_SMTPSERVICE_PROGID, },
{ NS_SMTPSERVICE_CID, &nsSmtpServiceConstructor, NS_MAILTOHANDLER_PROGID, },
{ NS_SMTPSERVER_CID, &nsSmtpServerConstructor, NS_SMTPSERVER_PROGID, },
{ NS_SMTPURL_CID, &nsSmtpUrlConstructor, NS_SMTPURL_PROGID, },
{ NS_MSGQUOTE_CID, &nsMsgQuoteConstructor, NS_MSGQUOTE_PROGID, },
{ NS_MSGQUOTELISTENER_CID, &nsMsgQuoteListenerConstructor, NS_MSGQUOTELISTENER_PROGID, }
};
NS_IMPL_MODULE(nsMsgComposeModule, components)
NS_IMPL_NSGETMODULE(nsMsgComposeModule)