views:

134

answers:

5

Hello!

I'm developing an administration panel (in php), for a website (in a shared host), to let the administrator to manage the personal infos of the employees! With this panel should be possible to create or delete an e-mail account for an employee and if the employee logs in the admin panel, he/she should be able to access to his/her e-mail account!

I had thought to install Horde WebMail on the website to let the employees use their e-mail accounts ... but how can I pass the login credentials to Horde?

And what you suggest to create and delete the e-mails account that can be read by Horde? Any other suggestion is greatly appreciated!

Thanks in advance!!!


EDIT: Or are there better alternatives to Horde to accomplish, at least, the e-mail account access from within the web site?

A: 

First, Horde seems to be a client. See feature page on their website:

IMAP and POP3 webmail client

This means that it's not enough to pass over the logins of your users to Horde. My guess is that you also have to create a new account directly at your mail server. Some mail servers can store login information in databases like MySQL or PostgreSQL. If this is right for your mail server you just have to add a new user in the correct table. This is called virtual users.

And like you did with your mail server you just add a new record in the database of Horde with the correct information.

This should only take to SQL statements. And if you want to add a little bit of security you wrap these both statements in a transaction.

So you would do something like this:

  1. Begin transaction
  2. Add a new record to Hordes database with the users login name and password for the mail server
  3. Add a new record to your mail servers database (login name, password etc.)
  4. Commit your data (end transaction)

Hope this helps a bit!

Jens
Thanks for your answer Jens! Your suggestion is good, but the host doesn't let me access to the email accounts configuration! :(
BitDrink
Don't bury your head in the sand yet! That's how I see it. But there are maybe other ways for this. Today most hoster use virtual users for their mail systems. I guess you are able to add new mail users through some kind of webpage? This means that your hoster most likely uses a database to store this information. Maybe you can contact him and ask him if you can have access to this databases or some kind of web service you can use to add new users.
Jens
A: 

While this might be more of a lazy man's solution - not to mention against the whole notion of this website - but have you given any thought to just using Google Apps (free version):

http://www.google.com/apps/intl/en/group/index.html

malonso
A: 

E-Mail accounts are created on the mail-server level. Horde can not do this part (It's a client only). You will need to access the mail server's settings directly. For a default Linux server setup (sendmail), I think this is pretty standardized. You may be able to gain insight on how to do this by looking into Webmin which can do this on *nix systems. However it's mainly in Perl I think.

Then there is other control panel software like Confixx and Plesk but I think they do not come in an Open Source flavour. I do not know of a PHP based Open Source hosting control panel, maybe somebody else does.

You will need exhaustive permissions, and probably the rights to configure the Webserver, to do these things from PHP. This is nothing you will be able to run on a shared hosting platform.

Pekka
A: 

SquirrelMail has some plugins that integrate with your mail server that allow you to create, maintain, and delete your email users. It can handle exactly what you want, including allowing the employer to manage only their employees, while you can assign yourself as an administrator of a higher level that can manage ALL users, etc.

EBM
A: 

You may try free AfterLogic Webmail Lite which allows to login into email account passing the login screen. The information about integrating into another web application is here.

AfterLogic