How to get HmailServer API for C#

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
tester
New user
New user
Posts: 6
Joined: 2018-10-16 08:15

How to get HmailServer API for C#

Post by tester » 2018-10-16 08:26

Am New to hmailserver . i didn't download and install the Hmailserver Software in my PC because of my storage issue. So what my question is how to use/get/work with Hmailserver API for my c# application without install that. is there any option available?

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: How to get HmailServer API for C#

Post by mattg » 2018-10-16 09:08

no, not really

But why would you want to?
The API will only work with a local hMailserver
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

tester
New user
New user
Posts: 6
Joined: 2018-10-16 08:15

Re: How to get HmailServer API for C#

Post by tester » 2018-10-16 12:33

mattg wrote:
2018-10-16 09:08
no, not really

But why would you want to?
The API will only work with a local hMailserver
Ok sir. Now i managed my storage and installed Hmailserver. how to connect hmailserver with my c# application? I have added interop.hmailserver , AutoresponderPlugin ,HmailServerDomainPlugin and ChangePasswordPlugin references into my project.

My basic c# code which helps authenticate the hMailServer user and returns an instance of the application

hMailServer.ApplicationClass application = new hMailServer.ApplicationClass();

hMailServer.Application hMailApp = Authenticate(userName, password);
hMailServer.Domain domain = hMailApp.Domains.Add();
domain.Name = domainName;
domain.Save();


what is my username and Password here?

tunis
Senior user
Senior user
Posts: 351
Joined: 2015-01-05 20:22
Location: Sweden

Re: How to get HmailServer API for C#

Post by tunis » 2018-10-16 16:32

tester wrote:
2018-10-16 12:33
what is my username and Password here?
Your admin username and password you login to hMailserver with.
HMS 5.6.8 B2534.28 on Windows Server 2019 Core VM.
HMS 5.6.9 B2641.67 on Windows Server 2016 Core VM.

User avatar
Dravion
Senior user
Senior user
Posts: 2071
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: How to get HmailServer API for C#

Post by Dravion » 2018-11-22 09:32

This should help to get you starting with c# and hMail

1) Download and unzip the Archive
2) Open and run it in Visual Studio

viewtopic.php?f=21&t=31507

Post Reply