Webmail Plus

Last updated on
30 April 2025
Webmail Plus Overview

Webmail Plus is an email client for Drupal. It's designed to provide email for any or all members of a Drupal site. It relies on a standard IMAP (Dovecot, Courier-IMAP) server for mail storage and localhost or SMTP (Postfix, Exim) server for mail delivery.

This example is based on Web sites using Webmail 6.x-1.4 with Drupal 6.8 and 6.9 then updated for Webmail Plus 6.x-1.7. Webmail Plus for Drupal 6 is still gaining features so please add to this documentation based on your successes.

We will refer to a domain named example.com because that is the international standard for example domains. By international agreement, example.com does not go anywhere or create network traffic.

Requirements

Server Setup

PHP 5.x

Webmail Plus requires PHP 5.x with IMAP and Mcrypt extensions.

SMTP server

You will need an SMTP server such as Postfix, Exim or Sendmail (not recommended). If have a shared web hosting account, you should already have this.

IMAP server

You will need an IMP server such as Dovecot (highly recommended), Courier IMAP (less recommended). If have a shared web hosting account, you should already have this.

Drupal

Drupal 6.x

Install Drupal then add in any extra modules that you need and you know will work reliably. I always use CAPTCHA and Image CAPTCHA to separate human user registrations from automated SPAM registrations. I also switch on Path so I can set the URL of content pages. pet_menu_default module automates the creation of both menu entries and URLs for content. Do not install experimental or beta modules because their code deficiencies may collide with the limitations of the relatively new Webmail Plus module.

AES module

AES provides cryptography API that Webmail Plus uses to store passwords which it intercepts at login. This allows sharing of Drupal passwords with email accounts. To use this feature you will need to select AES in the Authentication settings.

Bitcache module

Bitcache is required by the File Framework which is used by Webmail Plus to handle attachments.

RDF

The RDF module is another module required by File Framework. I used the 6.x-1.0-alpha5 version from 2009-Feb-02. RDF includes the RDF API module and the RDF Schema module. File requires only the RDF API module. RDF API has a lot of configuration settings and I used the default settings.

File Framework

Webmail Plus requires parts of the File Framework module. Most parts of the File Framework depend on the base File module, described as Allows uploading files as a standalone content type and provides a comprehensive file management framework. and the File module depend on Bitcache and Rdf.

The Fire Framework includes heaps of modules. You need File and Attachments. The default administration settings appear to work for both.

Mail API

Mail API provides an abstraction layer for accessing various mail servers and is required for Webmail Plus. I used 6.x-1.0. Go to Administer, Site building, Modules, and switch Mail API on.

Your mail server entries need a protocol and cannot be completed until you switch to IMAP-WU API to give you IMAP. Install IMAP-WU API, then comes back to Mail API.

If your mail server provides POP3 but not IMAP, you are stuffed until Mail API adds a native POP3 connection. PHP IMAP works with some PHP3 accounts and options but not all. Ask your ISP about using the IMAP protocol.

Optional Modules

ApacheSolr

Webmail Plus allows searching of emails using Apache Solr. Webmail Plus ships with Webmail Plus Solr Search module (located in the contrib directory). This module depends on ApacheSolr module so you need to install that as well.

Installation Instructions

Mail API

Return to Mail API to create a server entry. Your server entry needs a protocol IMAP-WU API provides IMAP.

Set Protocol to IMAPWU, currently the only choice.

Set Server Hostname to your mail host name, which might be something like mail.example.com.

Set Server Port to 143. Port 143 is for IMAP without SSL. 993 is for IMAP with SSL. When Mail API supplies POP3, you will be able to switch to port 110 for POP3 without SSL and 995 for POP3 with SSL.

Set Encryption to None at the start. Switch to SSL when everything else is working. If you only have SSL access, then set this option to SSL and make the port 993.

Set Domain to example.com or whatever you use for a domain.

Remove any default settings from Connection options.

Set Login Suffix to +example.com. Mail API will add your username to the front of this string. If your email user name is joe@example.com, put @example.com in this setting.

PHPMailer

Webmail Plus requires part of PHPMailer to compose mail. PHPMailer is included in Webmail Plus as of version 1.7. The version of PHPMailer that ships with Webmail Plus has been customized. Do not upgrade it! Should you try to replace it with you will lose Drafts functionality.

Webmail Plus

I used Webmail Plus 6.x-1.4.

Go to Administer, By module, Webmail Plus, and you will see the following headings.

  • Mail Storage
  • Mail Delivery
  • Authentication
  • Presentation
  • Address Book
  • User Settings
  • Publishing Settings
  • Debugging Settings

Mail Storage

In Mail Storage, under Mail Connection, select example.com. You can also switch on the use of cron if you already use cron for Drupal.

Mail Delivery

In Mail Delivery, set Mail Connection to SMTP and SMTP host to mail.example.net. For unencrypted SMTP, set SMTP port to 25 and Encryption to None. For encrypted SMTP, set SMTP port to 465 and Encryption to SSL.

Set Username to your email user name for testing. Currently Webmail Plus appears to allow only this one email address for sending all email. The username and password appear to ally only to reading email. Set Password to the password for your Username account.

Authentication

In Authentication, set Authentication Mechanism to User defined email password.

Presentation

Everything in Presentation can stay as the default for now.

Address Book

Address Book contains nothing until you install an address book module. Contact Manager is the module recommended by the Webmail Plus developers.

User Settings

In User Settings, change Preferred email format to Plain Text so that nobody has to put up with HTML unless they ask for it. Switch on Allow users to override the preferred email format to let individual users choose to annoy people with unwanted HTML.

Publishing Settings

Publishing Settings can stay at the default settings for now. When you have some email in the system, you might go to Allow publishing to these nodes and switch on Page to see what the option does.

Debugging Settings

In Debugging Settings, switch Enable debugging on. You might then find error messages in Administer › Reports › Recent log entries.

My account

Go to My account. The system may sleep for a while because Webmail Plus is looking for your email. You may get error messages if your Mail API server settings do not work with your mail server.

Select the Webmail Plus tab and enter your password. Look through the other Webmail Plus settings for your account.

View Email

Doh! This part is missing. Please fill it in. The code suggests you go to http://example.com/webmail_plus/. You probably need some sort of menu entries.

Optional modules

Webmail Plus has some optional modules that I have not yet tried. Please try them and add documentation.

URL Aliasing

Webmail Plus supports URL aliasing, which means you can replace http://www.example.com/webmail_plus with something like http://www.example.com/email. To do this you need to enable the core path module and run this query:

INSERT INTO url_alias(src,dst,language) VALUES('webmail_plus', 'email', 'en');
INSERT INTO url_alias(src,dst,language) VALUES('email', 'webmail_plus', 'en');

and visit http://www.example.com/admin/build/modules/list to allow the menu system to update.

Errors

When you go to My account for the first time, you might have to wait a while for the system to check mail then you might get the following errors. On my test site, the problem was caused by the settings in Mail API Connection options. I changed the default settings and the errors stopped.

The following error disappeared when I removed notls from Connection options.
* warning: imap_open() [function.imap-open]: Couldn't open stream {mail.example.com:995/notls}INBOX in /home/example/public_html/sites/add/modules/mail_api/contrib/imapwu_api/imapwu_api.module on line 66.

* warning: imap_check(): supplied argument is not a valid imap resource in /home/example/public_html/sites/all/modules/mail_api/contrib/imapwu_api/imapwu_api.module on line 172.

* warning: imap_fetch_overview(): supplied argument is not a valid imap resource in /home/example/public_html/sites/all/modules/mail_api/contrib/imapwu_api/imapwu_api.module on line 158.

Your email password is not correct

This error occurred all the time with lots of different settings and appears to be the default error message if the code cannot work out what happened. The underlying error can be as diverse as the PHP IMAP functions not installed.

Help improve this page

Page status: Not set

You can: