111 Can't open SMTP stream

I'm having problems sending email using Squirrel Mail included in EHCP. I'm using the latest version of 0.29.15 on an Ubuntu 10.04 based platform.

When I use the command below:

eric@eric-desktop:~$ echo "mailtest" | sendmail myemail@myemail.com

I receive the email in my inbox.

However, I am still receiving the following error when trying to send mail through the EHCP Webmail:

111 Can't open SMTP stream.

I can't figure out why it's giving me the error. Any ideas?

I finally fixed it.

The issue lies in the SquirrelMail Config.php file (/var/www/new/ehcp/webmail/config):

Original settings:

$useSendmail = false;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';

Fixed settings:

$useSendmail = true;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';

I guess useSendMail must be set to true if SquirrelMail since the path is referencing sendmail. This was not set by default. Working great now! Finally, my server is a server! Thanks!

EHCP Force Edition