hmail server and com

2011-11-09 Thread Al Musella, DPM

Hi
  I never used com before can someone help me translate this to coldfusion:
It will create an email account on the mail server programmatically!

I tried many variations of the cfobject tag to create the object but I get

Could not find the ColdFusion Component or Interface hMailServer.

Does it have to be registered someplace first? Or do I need the path 
to the file one the server?
thanks




   Dim obApp
Set obApp = CreateObject(hMailServer.Application)

' Authenticate. Without doing this, we won't have permission
' to change any server settings or add any objects to the
' installation.
Call obApp.Authenticate(Administrator, your-main-hmailserver-password)

' Locate the domain we want to add the account to
Dim obDomain
Set obDomain = obApp.Domains.ItemByName(example.com)

Dim obAccount
Set obAccount = obDomain.Accounts.Add

' Set the account properties
obAccount.Address = acco...@example.com
obAccount.Password = secret
obAccount.Active = True
obAccount.MaxSize = 100 ' Allow max 100 megabytes

obAccount.Save





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348556
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Leigh

     Set obApp = CreateObject(hMailServer.Application)

That looks like VB syntax. CF's createObject requires the type parameter for 
com objects.  If you are not familiar with com, read the docs first.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-697c.html
What version of CF are you using? CF9 64bit does not support com objects.

-Le

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348557
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Al Musella, DPM

I am using 32 bit windows server 2008  and 32 bit CF8
I read the version 8 docs already and searched google.  I tried type=com


At 07:57 PM 11/9/2011, Leigh wrote:

  Set obApp = CreateObject(hMailServer.Application)

That looks like VB syntax. CF's createObject requires the type 
parameter for com objects.  If you are not familiar with com, read 
the docs first.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-697c.html
What version of CF are you using? CF9 64bit does not support com objects.

-Le



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348559
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Russ Michaels

is the COMponent registered on the server? if not then it needs to be.

On Thu, Nov 10, 2011 at 1:14 AM, Al Musella, DPM
muse...@virtualtrials.com wrote:

 I am using 32 bit windows server 2008  and 32 bit CF8
 I read the version 8 docs already and searched google.  I tried type=com


 At 07:57 PM 11/9/2011, Leigh wrote:

      Set obApp = CreateObject(hMaiislServer.Application)

That looks like VB syntax. CF's createObject requires the type
parameter for com objects.  If you are not familiar with com, read
the docs first.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-697c.html
What version of CF are you using? CF9 64bit does not support com objects.

-Le



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348562
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Al Musella, DPM

I got it.. Stupidest mistake I made in a long time..  I was trying to 
run it on my test server.. which doesn't have hmail installed.  When 
I tried it on the live server it worked:)



CFOBJECT ACTION=Create
 NAME=hmail
 CLASS=hMailServer.Application

cfset temp=hmail.Authenticate(Administrator, password)
cfset domain=hmail.Domains.ItemByName(mydomain.org)

Domain = cfdump var=#domain#

br
cfset account= domain.Accounts.Add()
cfset account.Address='#email#'
cfset account.Password='#password#'
cfset account.Active=True
cfset account= Account.Save()


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348563
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Leigh

It happens .. glad you figured it out :)

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348564
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hmail server and com

2011-11-09 Thread Kym Kovan

you need to register it:

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec14713-7ff7.html


On 10/11/2011 12:14, Al Musella, DPM wrote:

 I am using 32 bit windows server 2008  and 32 bit CF8
 I read the version 8 docs already and searched google.  I tried type=com


 At 07:57 PM 11/9/2011, Leigh wrote:

  Set obApp = CreateObject(hMailServer.Application)

 That looks like VB syntax. CF's createObject requires the type
 parameter for com objects.  If you are not familiar with com, read
 the docs first.



-- 
Yours,

Kym Kovan
mbcomms.net.au



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348565
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm