I have a client who's site is built using WordPress. The account is using cPanel with webmail accessible at domain.com/webmail. They have 2 email accounts setup ([email protected] and [email protected]). I would love to be able have them access their webmail by logging into their WordPress site and clicking a menu link saying "Access Webmail" and then either pulling the cPanel webmail into an iframe, or some other method, but would ideally like to either sync or pre-populate the webmail info with their WordPress user info (email addy and password). I have searched for a plugin but haven't found anything. Anybody ever done this? Where would I begin? Thanks!
You would have to write this from scratch but it is entirely possible.
cPanel webmail is already configured to work with Horde, Roundcube and SquirrelMail which are all open source and very well documented. The main issue that wouldn't make it seamless is that cPanel uses exim4 as an email server and there would be no way to map the WordPress username and password info with the server authentication. This means they would have to be logged into both WP and cPanel.
Roundcube is better documented than SquirrelMail and you could probably work with the api and include the necessary code using includes from WordPress.
If you wanted to sync the user info you would need to install dovecot and postfix which can use virtual users that are mapped to mailboxes via a mysql database. You could just change the mappings to the WordPress database.
I'm writing a plugin for a client that will administer the email server from the WordPress dashboard but email functions aren't needed. I built the email servers from scratch using this excellent guide.
My plugin will create email accounts for WordPress users and also allow the admin to manage email accounts for the entire domain including non WordPress users. It will also allow the admin to create additional virtual aliases (forwarding email addresses).