WordPress uses the standard PHP mail() function, which uses sendmail. No account information is needed. This is not generally a problem if you are using a hosting service, but if you are using your own box and do not have an SMTP server, the mail will never send. If you are using a *NIX box, you should have either postfix or sendmail on your machine; you will just need to set them up (search the Internet for how-to's). If you do not want to go through setting up a complete mail server on your *NIX box you may find ssmtp useful — it provides "A secure, effective and simple way of getting mail off a system to your mail hub". On a Windows machine, try a sendmail emulator like Glob SendMail.

More help can be found on this thread of the WordPress Support Forums. For a plugin based alternative, you could try Configure SMTP: "Configure SMTP mailing in WordPress, including support for sending e-mail via SSL/TLS (such as GMail)."

Windows Host Server Specific: With the Configure SMTP plugin you can work around the issue of e-mails not being received. Alternately, check your "Relay" settings on the SMTP Virtual Server. Grant access to . Then in your php.ini file, set the SMTP setting to the same IP address. Also set smtp_port to 25.

Ensure Proper Return Address is Used: By default, the WordPress mailer fills in the From: field with wordpress@yourdomain.com and the From: name as WordPress.

This is fine if this is a valid e-mail address. For example, if your real e-mail is wordpress@yourdomain.com, your host should pass the email on for delivery. It will probably send your mail as long as yourdomain.com is setup to send and receive mail, even if wordpress is not a valid mail box. But if you set you real email as the From: address and it's something like wpgod@gmail.com, the mail may not send because gmail.com is not a domain handled by the mail server.

When using the plugin Configure SMTP the same applies, and there is an option to hard code the From: address. You can also use 'wp_mail_*' filters to change the From: address and name used. It's strongly suggested you do this because people involved with several blogs may get email from all of those blogs, and each of them likely is From: WordPress. Make your blog stand out as different!

function cdx_from_email() {
	return "wpgod@yourdomain.com";
add_filter( 'wp_mail_from', 'cdx_from_email' );
function cdx_from_name() {
	return "WPGod";
add_filter( 'wp_mail_from_name', 'cdx_from_name' );

Use the above code by adding it to your theme or child theme functions.php file.

Treated as Spam: Your email message may have been routed to a spam folder or even worse, simply discarded as malicious. There are a couple measures you can use to convince recipient's mail servers that your message is legitimate and should be delivered as addressed.

SPF: (Sender Policy Framework) This is the most common anti-spam measure used. If you are on a hosted system, there is a good chance your host has set this up for the mail server you are using. Have WordPress email you and check the message headers for evidence that the message passed the SPF check. You can get a message sent by following the Forgot Password link on the login page. To keep your old password, do not follow the link in the message. If your system email failed the SPF check, you can set up the credentials if you have access to your DNS records and your mail server's domain belongs to you. Check the return path of the email your system sent. If the mail server listed there has your domain name, you can set up SPF credentials. There are several how-tos on the Internet.

DKIM: (Domain Key Identified Mail) This system is also used. You can use both SPF and DKIM in the same message. Again, just as with SPF, you can check if your receiving mailserver verified your host's domain key by examining the mail header. There is a fair chance no signature key was provided, indicating your host chose to not use this protocol. Also as with SPF, if you can edit your DNS records and the mail server belongs to your domain, you can set up DKIM credentials yourself. Some how-tos exist if you search the Internet.

To get WordPress to send the proper DKIM keys, hook the 'phpmailer_init' action. You are passed the $phpmailer object. Set the necessary properties and return the object. See the class source code for more information. It's on wp-includes/class-phpmailer.php .

Posted in: WordPress

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677