MySQL hm_accounts accountvacationmessageon

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-01 23:42

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.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: MySQL hm_accounts accountvacationmessageon

Post by percepts » 2014-08-02 00:03

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?

xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

Re: MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-02 00:06

how do you call refresh cache with php and the COM?

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

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: MySQL hm_accounts accountvacationmessageon

Post by percepts » 2014-08-02 00:16

Afraid you're out of luck. We don't support direct updates of DB from outside of hmail.

xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

Re: MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-02 00:30

So how does a end user update their out of office auto reply?

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: MySQL hm_accounts accountvacationmessageon

Post by percepts » 2014-08-02 00:37

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.

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

Re: MySQL hm_accounts accountvacationmessageon

Post by mattg » 2014-08-02 02:21

Or you can code it using the com api
(just don't do direct database injection)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

Re: MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-04 18:36

Is it possible to do an automatic login with PHPWebAdmin? it would be frustrating to have my users login twice.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: MySQL hm_accounts accountvacationmessageon

Post by percepts » 2014-08-04 18:47

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

xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

Re: MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-04 18:50

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.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: MySQL hm_accounts accountvacationmessageon

Post by percepts » 2014-08-04 18:55

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.

xydon1
Normal user
Normal user
Posts: 61
Joined: 2011-03-15 19:42

Re: MySQL hm_accounts accountvacationmessageon

Post by xydon1 » 2014-08-04 19:01

Thank you for your time sir! your a scollar and a gentleman! :0)

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: MySQL hm_accounts accountvacationmessageon

Post by ^DooM^ » 2014-08-05 01:33

If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Post Reply