Technology Insights

WordPress Not Sending Mail After Moving Site to a New Server

There could be a couple issues causing WordPress to not send mail however in a server move the most likely is that the previous server was using Sendmail and the new server is using a different mail server like Postfix or vice versa. There also are a couple ways to resolve the issue and I will explain each method below however I recommend installing a WordPress Add-on to resolve the issue versus modifying a core WordPress file that could inadvertently be overwritten in the future.

The two ways which are described in detail to resolve this issue are to either install the WP-Mail-SMTP WordPress plugin or to modify the pluggable.php file located in the /wp-root/wp-includes directory. Each method will change the way that the $phpmailer function sends mail.

Technology Insights

How to Find Out Which Package Installs a Certain Command Using yum

To find out how to install a certain command or utility via yum you can use list or the “whatprovides” option as shown below.  

This is an example of using yum with the list option to find any packages with “send” in the name.

bash

  1. yum list *SEND*

Using this command will provide results like the below.

bash

  1. [root@server ~]# yum list *SEND*
  2. Loading "installonlyn" plugin
  3. Setting up repositories
  4. Reading repository metadata in from local files
  5. Available Packages
  6. mgetty-sendfax.x86_64 1.1.33-9.fc6 base
  7. nautilus-sendto.x86_64 0.7-5.fc6 base
  8. nautilus-sendto-bluetooth.x86_64 0.7-5.fc6 base
  9. perl-Email-Send.noarch 2.192-2.el5.rf rpmforge
  10. perl-Jabber-SimpleSend.noarch 0.03-1.el5.rf rpmforge
  11. perl-Mail-SendVarious.noarch 0.3-1.el5.rf rpmforge
  12. perl-Mail-Sender.noarch 0.8.16-1.el5.rf rpmforge
  13. perl-Mail-Sendmail.noarch 0.79-1.2.el5.rf rpmforge
  14. perl-Net-SenderBase.noarch 1.01-1.el5.rf rpmforge
  15. perl-X11-SendEvent.noarch 1.3-1.2.el5.rf rpmforge
  16. sendip.x86_64 2.5-2.el5.rf rpmforge
  17. sendmail.x86_64 8.13.8-2.el5 base
  18. sendmail-cf.x86_64 8.13.8-2.el5 base
  19. sendmail-devel.x86_64 8.13.8-2.el5 base
  20. sendmail-devel.i386 8.13.8-2.el5 base
  21. sendmail-doc.x86_64 8.13.8-2.el5 base

If you are unable to provide the command or utility you are looking for using the list option then try whatprovides as shown below when trying to install iostat.

Technology Errors

STARTTLS: read error=generic SSL error

When receiving this error you are either having a STARTTLS problem or there is a chance that it is a bug in sendmail and you just need to supply a patch to sendmail. First to resolve the issue follow the below steps.

1. Stop sendmail: /etc/init.d/sendmail stop
2. Make sure the PID’s all stopped: ps -ef | grep sendmail
3. If not kill the stuck process ID’s: kill -9
4. Also check the PID’s from the maillog where you originally saw the error and make sure those are not running.
5. Start sendmail: /etc/init.d/sendmail start