Setting up emailers

Created on 2016/10/20, emails, mailer, php mailer

We’ll gather in this page various configuration tips and tricks for having emails work on various systems.



Enterprise Linux



author Contributed


This tutorial specifically shows how to configure a FreeBSD system to use a Gmail account for its sendmail calls. It replaces the default sendmail client with sSMTP.

With that said, the settings used for Gmail can easily be replaced for any other email service, including your own.

Update FreeBSD Ports Tree:

portsnap fetch update

Disable Default Sendmail:

You can disable Sendmail by adding the following lines to the file /etc/rc.conf:


After this you can reboot or you can kill sendmail manually with the following command:

killall sendmail

Install sSMTP port:

cd /usr/ports/mail/ssmtp/ && make install

Configure sSMTP:

Next, you need to create a configuration file for sSMTP:

ee /usr/local/etc/ssmtp/ssmtp.conf

Add the following:



– is a real email on Gmail. Example:

– is a password for the email account specified for

Test sSMTP:

Create a txt file “message.txt” with the following text:

Subject: Testmessage
This is a test for sending

Where is your current or second email to get the test email. Run the following command:

ssmtp -v < message.txt

After this you will get a text output confirming your mail was sent. If there were no errors, then you can verify it worked by checking

If you get errors however, double-check the sSMTP config.

Replace sendmail with sSMTP:

This makes sSMTP the default mailer for the system (i.e. replaces all calls for sendmail).

mv /usr/sbin/sendmail /usr/sbin/

ln -s /usr/local/sbin/ssmtp /usr/sbin/sendmail

Make sure that mail is working by using the following command:

mail -v -s "test subject"

To change the name in which e-mail comes from:

chpasswd www

The chpasswd tool uses vi as its text editor. If you don’t know how to use it, you can visit Colorado State’s reference sheet.

Once the file is opened, find the user’s full name, it will look something like this:

Full Name: World Wide Web Owner

Change the full name::

Pydio From

On Pydio:

Use the default sendmail setup and it should work as expected.