Question: I use WordPress 2.8.3. When a new user creates a new account and click Register link, WordPress shows a blank page. There should be something like ‘ Your password has been emailed to you ‘. What’s up?
At web site deployments we frequently experience minor issues when configuring PHP applications that require email, like WordPress, on a Windows server (IIS), which requires the use of SMTP to send email. On a Linux/Apache server, the PHP mail function is very simple and almost always works.
If you are totally lost, try to find a plugin that is not compatible with the current version, or has bugs in its codes – find path errors, redeclarations etc., or you must just check out your own e-mail (SMTP?) account settings.
Two rare errors from our experience:
1. Both a plug-in and the WordPress try to use its own PHPMailer class. One possible solution is to check the existence of the class to avoid redeclaration. Change the code in the plug-in or in the pluggable.php file:
2. Some web hosting and e-mail server providers are protected from the use of injections in the mail function. So, they’re generating an error when Subject string is malformed. In the class-phpmailer.php you may have to change the followings:
It would be nice if WordPress had built-in (adequate) mail server configuration, but for now it’s not too difficult to edit the class files. As with any WordPress hacks, take care to update the files when you upgrade WordPress. Always backup old files just in case you screw things up.
// (Re)create it, if it's gone missing
if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
if ( !class_exists('PHPMailer') ) {
require_once ABSPATH . WPINC . '/class-phpmailer.php';
}
if ( !class_exists('SMTP') ) {
require_once ABSPATH . WPINC . '/class-smtp.php';
}
$phpmailer = new PHPMailer();
}