×


Drupal unable to send email error

Most Drupal user are unable to send email  and thus get an error message instead.

As part of our Linux Technical support services, we have helped customers solve Drupal related issues.

In this context, we shall look into the common reason why this error occur and how to solve it.

What triggers Unable to send email error in Drupal?

The email sending issues results from when the system configuration does not allow a username to be set in both the email message header "From" address as well as the "envelop from" address.

How to fix Unable to send email error in Drupal

To fix this issue, it is recommended that the From address is configured technically. This involves modifying the php.ini file. In here you can look out for the line which looks like;


sendmail_from = "email@website.TLD"


Next look our for the envelope from address in the php.ini file and set it to the same address as specified above;

sendmail_path = "/usr/lib/sendmail -t -f email@website.TLD"


Additionally, if the email server SendMail fails to start, it is possible that there is a permission issue. To fix this, add the Apache user "www-data" to the mail group located at "/etc/group".

This will finally solve the issue.

Need support in fixing Drupal errors? Contact us.


Conclusion

How to fix Drupal unable to send email error.