SMTP module - "Unable to send e-mail..." and "A test e-mail has been sent..." I am using the SMTP module (7.x-1.0) on Drupal 7. The site is hosted on a cloud server on which I've installed LAMP. My SMTP config settings are:


SMTP server:  smtp.gmail.com 
SMTP port:  465
Use encrypted protocol:  SSL
Username: example@gmail.com
Password: [password]
E-mail from address: example@gmail.com


When I try to send a test email, I get two messages and an error in the "Reports > Recent log messages":


A test e-mail has been sent to example@gmail.com. You may want to check the logs for any error messages.
Unable to send e-mail. Contact the site administrator if the problem persists.
Error sending e-mail (from example@gmail.com to example@gmail.com).


The email is NOT sent. However, the email appears in "Reports > Maillog" (Maillog module).

There is an error in /var/log/apache2/error.log:


  sh: 1: /usr/sbin/sendmail: not found


Update/Edit:


I was under the impression that the SMTP module avoids the need for
Sendmail.I thought, the whole point was that it uses an external SMTP
server. I found the following issue by the way:
drupal.org/node/1078106.
It looks like the sendmail service is not installed.

Try the command sudo apt-get install sendmail via ssh to install it.