Visual Studio 2013 but not earlier and not above. You need to import hMailServers Typelibe (hMailServer.tlb it hMailServer \bin folder)Įxamples how you can access hMailServer from C# and other Languages can be found If you want to access hMailServer by C#.NET or VB.NET or native C/C++ To get the answer to this question it is important to select the module smtpenum using the command ‘use’ and then go through the list of options in this module using the ‘options’ command where we see the word wordlist in the USERFILE row this indicates that this option is used to set the wordlist. To use it via Runtime binding you can just call any hMailServer COM API Object Late binding and Typelib based late access. hMailServers Main Server Object is a OutOfProcess Server which supports You also can use any COM/DCOM Language or Toolkit which can access Microsoft COM Otherwise I have to download messages from all accounts in a time loop, which is stealing my server CPU and memory especially where there is about 60 email accounts and thousands of messages in them and have to iterate them all over.Īs you found out your self, you can use VB-Script and JScript to run hMailServer specific Events, invoked by C:\Program Files (x86)\hMailServer\Events\EventHandlers.vbs I could write a trigger with SQLCLR function which could do the same as mentioned above but even if I have *.eml file name I do not have its actual location on the hard drive. Row in that table contains only information about account, folder, flags, dates and name of *.eml file. I realised that in MS SQL database of hmailserver is table called hm_messages which is automatically filled when email arrives but contains no subject, mostly no sender and definitely no body and attachment count. So using one SQL query I can get all notifications for all accounts and send them through signalR. Goal: to have instant information about all emails containing from, to, subject, message perex(first 100 chars), attachments flag and read flag accessible through SQL query without having to connect to IMAP or PO3. Trigger calls function in external DLL which would parse the email body a writes data about recipient, subject, message perex andĪttachment count to special database table for speedlisting andĮmail notification purposes which could be located in the same.Message is coming to hMailServer from sender.Maybe it is a dummy question and there exists better approaches, but I wonder if there is any possibility of catching an event on incoming email using server side script and inside that script would be external DLL call or script which connect to database and writes some metadata from incoming message (same as external DLL would)?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |