Page 1 of 1

MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-01 23:42
by xydon1
So I wrote a small script to enable and update the mysql table using PHP. However, when I enable it, my auto reply does not work. Only from the hmailserver interface will it work.

My past experience is it must have something to do with a COM call. Is this right?

Can I not simply update the hm_accounts table accountvacationmessageon=1 and have it work.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 00:03
by percepts
hmail uses cacheing. How have you handled refresh of the cache?

try your software, then restart hmailserver service and see if it has done what you expect.

AND

did you use COM API from PHP ?
if not why not?

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 00:06
by xydon1
how do you call refresh cache with php and the COM?

By the way, I used my script, restarted the server and no joy!

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 00:16
by percepts
Afraid you're out of luck. We don't support direct updates of DB from outside of hmail.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 00:30
by xydon1
So how does a end user update their out of office auto reply?

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 00:37
by percepts
you install PHPWebAdmin which comes with hmail and the user can log in from anywhere in the world and change it.

See http://www.hmailserver.com/documentatio ... hpwebadmin

helps to read the documentation so you know what you've got and while you're at it, you'll find that PHPWebAdmin is written using the COM API to do all its hmail settings updates. The COM API ensures DB integrity whereas direct SQL updates can lead to major problems and may fail after next hmail upgrade whereas COM API calls shouldn't. Another reason why direct DB updates aren't supported.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-02 02:21
by mattg
Or you can code it using the com api
(just don't do direct database injection)

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-04 18:36
by xydon1
Is it possible to do an automatic login with PHPWebAdmin? it would be frustrating to have my users login twice.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-04 18:47
by percepts
what else are they logging into ?

you wanted to use PHP and PHPWebAdmin is written in PHP so you can change it to do whatever you want. And obviously it uses COM API so you have example code on how to update your auto reply.

But note we do not support your code or provide tutorials on how to code PHP

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-04 18:50
by xydon1
What I wanted was to use roundcube for the gui version of their email. I got the PHPWebMail to work with the COM but it requires a seperate login, make sense?

I am working on with JQuery to login both directory login forms but if there is a way to do it with PHPWebMail I would prefer it.

and I fully understand the not supporting my code thing as well.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-04 18:55
by percepts
There is nothing in PHPWebAdmin to do it but...

https://myroundcube.com/myroundcube-plu ... der-plugin

I never used it and its not free but will save you a lot of hassle and be nicely integrated with roundcube if it works.
There are other plugins at that site specifically for roundcube/hmailserver too.

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-04 19:01
by xydon1
Thank you for your time sir! your a scollar and a gentleman! :0)

Re: MySQL hm_accounts accountvacationmessageon

Posted: 2014-08-05 01:33
by ^DooM^