Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 Add Hmail Server to mail components
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic 
Page: of 2

Art
Starting Member

USA
32 Posts

Posted - 07 November 2010 :  12:28:52  Show Profile  Visit Art's Homepage  Reply with Quote
Hello all!

I am running Hmail Server on WinServ2003. One forum (set up years ago) is using (I believe) cdosys to send messages. Another forum needs mail service now, and I would like to add Hmailserver to the list. Should I try to get cdosys to send the mail for this forum (with which I am possibly having issues), or can I add code for hmailserver to do the job?

I'll start with some sample code from inc_mail:
case "jmail"
		Set objNewMail = Server.CreateObject("Jmail.smtpmail")
		objNewMail.ServerAddress = strMailServer
		objNewMail.AddRecipient strRecipients
		objNewMail.Sender = strSender
		objNewMail.Subject = strSubject
		objNewMail.body = strMessage
		objNewMail.priority = 3
		on error resume next '## Ignore Errors
		objNewMail.execute
		If Err <> 0 Then 
			Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
		End if


Now an example components list from admin_config_email (with the string HmailServer instead of "jmail" or the like:
	'## the components
	
	theComponent(13) = "HmailServer"
	

	'## the name of the components
	
	theComponentName(13) = "HmailServer"
	
	

	'## the value of the components
	
	
	theComponentValue(13) = "HmailServer"
	


Can anyone point me in the right direction for altering this code to fulfill the requirements for hmailserver, as well as identifying other bits of code that may be involved?

http:\\StarFrontiers.org

Edited by - Art on 07 November 2010 12:31:09

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 November 2010 :  21:51:55  Show Profile  Reply with Quote
Don't have my code tools in front of me to write the exact code for you, but if anyone wants to help you out, here is a sample script to send a message with hmail using the Message api: http://www.hmailserver.com/documentation/v5.3/?page=com_example_message_send

Here are the details on the Message object: http://www.hmailserver.com/documentation/v5.3/?page=com_object_message

Support Snitz Forums
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 11 November 2010 :  10:49:46  Show Profile  Reply with Quote
Ok, since no one else stepped in, here is the code you would put in inc_mail.asp. After line 356 (right before the "end select") paste this bit of code:
case "hmail"
		Set objNewMail = CreateObject("hMailServer.Message")
		objNewMail.From = strFromName
		objNewMail.FromAddress = strSender
		objNewMail.AddRecipient strRecipientsName, strRecipients
		objNewMail.Subject = strSubject
		objNewMail.Body = strMessage
		on error resume next '## Ignore Errors
		objNewMail.Save
		If Err <> 0 Then
			Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
		End if


In admin_config_email.asp, change lines 100 - 102 to this (increasing the 20 to 21):
Dim theComponent(21)
Dim theComponentName(21)
Dim theComponentValue(21)


After line 125, add the code in red:
theComponent(20) = "VSEmail.SMTPSendMail"
theComponent(21) = "hMailServer.Message"


After line 148, add the code in red:
theComponentName(20) = "VSEmail"
theComponentName(21) = "hMailServer"


After line 171, add the code in red:
theComponentValue(20) = "vsemail"
theComponentValue(21) = "hmail"


That's it. Test it and let me know if it works.

Support Snitz Forums

Edited by - Davio on 11 November 2010 10:50:20
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 13 November 2010 :  17:29:47  Show Profile  Visit Art's Homepage  Reply with Quote
Thanks Davio!

I have been out at sea for a few days, so I have not been able to check in.

I will edit the code (and certainly check out these links).

I hate not knowing code and structure of .asp, php, or even much HTML. I am so lost, I wasn't even sure that "theComponent" was an array. Apparently, arrays in .asp use () instead of [].

http:\\StarFrontiers.org
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 13 November 2010 :  17:42:40  Show Profile  Visit Art's Homepage  Reply with Quote
Hmmm.

Well, I patched in the code, and for whatever reason when in the email config screen in the forum I only have CDOSYS (IIS 5/5.5/6) that shows up. Any hints as to why?

http:\\StarFrontiers.org
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 November 2010 :  22:24:16  Show Profile  Reply with Quote
Hmm, maybe the code isn't correct.

Just had a quick chat with a dev on their IRC channel. He said the examples aren't accurate and need updating, and that I need to authenticate before I call the COM API.

I'm going to download and install hMail and test it locally. Quicker to help you that way.

Support Snitz Forums
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 14 November 2010 :  01:28:08  Show Profile  Visit Art's Homepage  Reply with Quote
Wow,
Thanks Davio.

I guess I help folks out a lot on any number of things, including boat systems as well as C++ and GML, but that doesn't make me appreciate someone else helping me out any less. You are seriously going out of your way here, and if this wasn't important or if I thought I was capable of solving this issue in a reasonable amount of time, I wouldn't waste your time.
This is for a non-profit 501c (Adoption Related Services of Pinellas http://arsponline.org ). They are a mental health counseling program for foster and post adoption kids and families that have some serious issues. I am the volunteer sys-admin. They don't exactly have a lot of disposable income, and have a huge admin load. I have set up OPENEMR as a Mental Health Record system, and I am hosting a mail server and their website. I have been writing some little applications for them, building office furniture, painting, plumbing, taking care of computers, networks, lost files, and ridding them of infestations of ants and bats. It's a little overwhelming. I have also had to scan and import about 4 filing cabinets worth of records and putting them into the EMR. I am hoping that they can use the Forum as a Policy and Procedure/document download gateway for admin use, and get any other utility for them out of it I can. I really wish I could set up a PM system, but I have noticed that not many of the mods I have tried to implement for Snitz have worked for my own little fan forum (http://starfrontiers.org). Some folks have had issues with the mail server from time to time for which I have had to do work-arounds (ISP's blocking port 25, silly folks sending huge encrypted file containers, folks unable to set up their own accounts on their mail client etc...), and a sort of web-mail setup might be really nice for them. I am just trying to get some real tools and databases available for these folks. One of them happens to be my wife. Since they all have very expensive educations, are totally dedicated, and make almost no money, they all tend to put in something like 14+ hours a day, including weekends. Anything I can do to network them better will lighten that load. They are literally killing themselves. I know they are masochists, but, well, as I said: One of them is my wife.
Thanks again Davio.

http:\\StarFrontiers.org
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 14 November 2010 :  17:07:10  Show Profile  Reply with Quote
Hey Art, it's not a problem. It's the norm here.

I installed and got hmail up and running along with IIS 7. I am using Windows 7 Professional x64.
After doing some testing I realized the hMail component was giving a permission denied error, as is posted here on the hmail forums: http://www.hmailserver.com/forum/viewtopic.php?f=9&t=13820

It doesn't show up in your pages because we make sure to hide the errors quietly and continue loading the page.

After I followed the advice of the last poster in that thread, it fixed the error and was able to use hmail to send emails.

Which operating system are you running hMail on?
Try the fix posted by jwadew:
quote:
Start, Run dcomcnfg.
Expand Component Services, Computers, My Computer and DCOM Config.
Right-click hmailserver, select the Security tab.
Under Launch and Activation Permissions, click the Edit button.

If you do not see the Internet Guest Account, then add that:
Click the Add button, then the Advanced button, then the Find Now button.
Scroll down to a user starting with IUSR_, select it, then click Ok
Continue to next step below...

If you do see the Internet Guest Account, then make sure that Local Launch and Local Activation rights are checked.

Support Snitz Forums

Edited by - Davio on 14 November 2010 17:13:11
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 17 November 2010 :  06:15:09  Show Profile  Visit Art's Homepage  Reply with Quote
Windows Server 2003

I will make sure to check the IUSER permissions for hmail. Immediately.

http:\\StarFrontiers.org
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 November 2010 :  08:36:33  Show Profile  Reply with Quote
Ok. Then if that doesn't work, will have to give you a file that will check if there is an error. But let me know if you get any where with the previous suggestion.

Support Snitz Forums
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 17 November 2010 :  09:37:03  Show Profile  Visit Art's Homepage  Reply with Quote
Darn.
Still just CDOSYS showing up for e-mail components.


http:\\StarFrontiers.org
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 17 November 2010 :  17:34:20  Show Profile  Visit Art's Homepage  Reply with Quote
W00T!
Davio got it! Permissions issue (unknown by me as to exactly what).

http:\\StarFrontiers.org
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 November 2010 :  18:54:06  Show Profile  Reply with Quote
I did the same thing in the link I posted before on the hmail forum. Opening the DCOM Configuration window, searching for hmailserver component, right clicking to open properties, security tab, and giving the IUSR_ account permission to launch the component.

Support Snitz Forums
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 17 November 2010 :  20:24:23  Show Profile  Visit Art's Homepage  Reply with Quote
Oh, I thought I gave it rights. I guess all I did was give it read/write, not execute. DOH!! Of course it has to have execute rights....pretty dumb on my part.

http:\\StarFrontiers.org
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 November 2010 :  21:33:36  Show Profile  Reply with Quote
Maybe you were in the wrong place.

You go to Start >> Run.. >> type in "dcomcnfg" and press enter
OR
My Computer >> Control Panel >> Administrative Tools >> Component Services

In the window, as shown below, double click on Component Services, Computers, My Computer.
Click on DCOM Config and right click on hMailServer, to get to Properties.



In the Properties window, click the Security tab, then the Edit button in the Launch and Activation Permissions section as shown below.
I gave the IUSR_ account (the internet guest user) permission to launch locally.


So not sure where you went to give read/write. hehe Might want to undo it.

Support Snitz Forums
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 18 November 2010 :  11:07:51  Show Profile  Visit Art's Homepage  Reply with Quote


Thought you were talking about here. (example from my workstation)

Traverse/Execute permissions after granting IUSER access.

http:\\StarFrontiers.org

Edited by - Art on 18 November 2010 11:08:57
Go to Top of Page
Page: of 2 Previous Topic Topic   
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07