Configuring Feng Office 1.7.4 Community Edition To Send Email Via Gmail – Ubuntu Server 10.4 Lucid

In my previous post I installed Feng Office 1.7.4 Community Edition on Ubuntu Server 10.4 Lucid.

With the installation complete, I wanted to configure Feng Office to send and receive emails and found that the best option (for me) was to configure Feng Office to use Gmail.

I set up an additional Gmail account for the Feng Office Administrator to use as I already had a Gmail account for myself.

Note: I did also configure Feng Office to connect to my Hotmail / Windows Live account – but currently Feng Office only allows me to receive emails from this account.

The first step that you need to complete once you have a Gmail account is to enable IMAP. Log in to Gmail and then click Options cog at the top right of the screen – then click the Mail Settings link.

Click the Enable IMAP radio button and then click the Save Changes button.

That is all we need to do on the Gmail side of things so the next step is to configure the Feng Office Admin account to send emails via our Gmail account. This will enable users to receive reminders and other system generated emails.

Log in to Feng Office as the Administrator and then click the Administration link:

Click the Configuration button:

Click on the Mailing link:

Below you can see how I set the options to connect to my Gmail account. Obviously you will need to change the Gmail email address to the one that you want to use. Click Save.

Setting up a Gmail account for a user is a little different. If you need to add a user just click Administration followed by the Add user link:

Type in the User name and their Gmail address and then click Add user:

Click Administration again and then click Add Email account:

This is how I configured the incoming email settings for my user account (I have removed the first part of my gmail address). You will need to use an email address that is different from the Admin user Gmail address:

Below is my configuration for the SMTP settings:

Update: This seemed to be enough to get things working until I upgraded to Feng Office 1.7.5 – though I cannot be sure that upgrading was the trigger that prevented the Feng Office admin account from sending emails.

If we first look at the cron settings in the Admin panel in Feng Office (Log in as Admin and click Administration then Cron events) we can see that it is set to check for emails every ten minutes:

The solution was to create a cronjob that calls on the cron.php file which resides in the root of the Feng Office installation folder, as follows:

sudo crontab -e

I set my cron job to run every minute as signified by the five asterisks – followed by the script to call on cron.php.

* * * * * sudo wget -O - -q http://<server-ip>/feng_community/cron.php

You can change this to run the cron job as often as you would like – you will need to change the IP address to that of your server – and you may need to adjust the path to cron.php depending on your installation.

The frequency of this cron job can over-ride the settings that you specify within the Cron events page in the Feng Office admin panel. For example, if you configure a cron job to run every five minutes, and you configure the cron event to check for upgrades every one minute, it will only be able to check for upgrades every five minutes.

This setup was enough to get the Admin user to send notifications to Feng Office users and for me to be able to send and receive emails within Feng Office.

There are plenty of other options that can be set and so I would recommend that you read the Feng Office Wiki pages that deals with Setup and  Email here and here.

Support is also available from the Feng Office Forum.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s