Menu

API documentation

Help
Alfrye
2009-08-06
2013-04-17
  • Alfrye

    Alfrye - 2009-08-06

    Is API documentation available for NMail. I am looking to use NMail in a project I am working on.

     
    • Luke

      Luke - 2009-08-06

      Hi,

      There isn't really any documentation available; but I'm happy to answer any questions that you have.

      --Luke

       
    • Alfrye

      Alfrye - 2009-08-06

      Hi,

      Thanks Luke! I looking to see about integrating NMail into one on my projects as the SMTP Server.  I downloaded the source last night to look at. I was going to start creating a unit test to send email and then read a email send back to the system.

      I am assuming I must first create  a user and a store in order to start using the system.

       
      • Luke

        Luke - 2009-08-06

        I almost forgot there is a developer's guide in the doc directory. It gives an overview of the system in case you haven't already seen it.

        That's correct, you need a store and a user to be able to accept an email from another mail server.

         
    • Alfrye

      Alfrye - 2009-08-06

      I have looked at the developers guide.

      I created a unit test in my project to create a new user and local store and I have referenced all the Dll from the NMail solution.

      Added the following code to open the config file

      System.Configuration.Configuration config = NMail.Configuration.NMailConfigFile.OpenConfig(@"C:\Program Files\NMail\NMail Server 1.1\NMail.config");

      ILocalStoreData localStoreData = NMail.Configuration.NMailConfiguration.Current.LocalStoreData;

      but the llocalStoreData is returning null.  I am sure I am just missing something here.

      Thanks for any help!

       
      • Luke

        Luke - 2009-08-10

        Hi,

        The NMail configuration class acts as a sort of quick and dirty inversion of control container. For it to setup the local store correctly you need a line in the config file that looks like this:

        <NMail>
                <NamedServices>
                    <NamedService Name="LocalStore" Type="NMail.LocalStore.LocalStore, NMail.LocalStore" />           
                    <NamedService Name="LocalStoreData" Type="NMail.LocalStoreData.NHibernate.NHibernateLocalStoreData, NMail.LocalStoreData.NHibernate" />

        ...

        Which tells the configuration class which implementation to instantiate for the local store.

         

Log in to post a comment.

MongoDB Logo MongoDB