Skip to main content

Email not sending

Problem

Users request password reset but don't receive the email with the reset link.

Symptoms

  • User submits email/username but receives no email
  • Email goes to spam/junk folder
  • Email delivery is significantly delayed
  • Error message: "The e-mail could not be sent"

Common causes

WordPress mail function issues

WordPress uses PHP's mail() function by default, which many hosting providers restrict or block.

Server configuration

Email server settings may be incorrect or missing SPF/DKIM records.

Spam filters

Reset emails may be flagged as spam due to content or sender reputation.

Plugin conflicts

Other plugins may interfere with email delivery.

Solutions

Solution 1: Install SMTP plugin

Use a dedicated SMTP plugin for reliable email delivery.

Recommended plugins:

  • WP Mail SMTP
  • Easy WP SMTP
  • Post SMTP

Steps:

  1. Install WP Mail SMTP plugin
  2. Go to WP Mail SMTP > Settings
  3. Configure with your email provider:
    • Gmail
    • SendGrid
    • Mailgun
    • Amazon SES
  4. Test email delivery
  5. Try password reset again

Example Gmail configuration:

  • SMTP Host: smtp.gmail.com
  • SMTP Port: 587
  • Encryption: TLS
  • Authentication: Yes
  • Username: Your Gmail address
  • Password: App-specific password

Solution 2: Check email settings

Verify plugin email settings are correct.

Steps:

  1. Go to Settings > Frontend Reset Password
  2. Check "Email Sender" field
  3. Use a valid email address from your domain
  4. Avoid using noreply@ addresses (often blocked)
  5. Save changes

Example:

Solution 3: Check spam folder

Email may be delivered but filtered as spam.

Steps:

  1. Check user's spam/junk folder
  2. Mark email as "Not Spam"
  3. Add sender to contacts
  4. Check email content for spam triggers:
    • Excessive links
    • ALL CAPS text
    • Spam keywords

Solution 4: Verify server email configuration

Check server can send emails.

Test with WordPress:

  1. Install "Check Email" plugin
  2. Send test email
  3. Check if received
  4. If not, contact hosting provider

Contact hosting provider about:

  • Email sending limits
  • SMTP restrictions
  • SPF/DKIM records
  • Reverse DNS setup

Solution 5: Check for plugin conflicts

Other plugins may interfere with email delivery.

Steps:

  1. Deactivate all plugins except Frontend Reset Password
  2. Test password reset
  3. If emails work, reactivate plugins one by one
  4. Identify conflicting plugin
  5. Contact conflicting plugin support

Common conflicts:

  • Security plugins blocking emails
  • Caching plugins interfering with delivery
  • Other email plugins

Solution 6: Increase email timeout

Server may timeout before email sends.

Add to wp-config.php:

wp-config.php
define( 'WP_MAIL_TIMEOUT', 30 );

Solution 7: Use email logging

Install email logging plugin to debug.

Steps:

  1. Install "WP Mail Logging" plugin
  2. Request password reset
  3. Go to Tools > Email Log
  4. Check if email was sent
  5. Review error messages

Solution 8: Check email queue

Some hosts use email queues that may be backed up.

Steps:

  1. Contact hosting provider
  2. Ask about email queue status
  3. Request queue flush if needed

Solution 9: Whitelist sender

Add sender email to whitelist.

For users:

  1. Add sender to email contacts
  2. Create filter to never mark as spam

For administrators:

  1. Configure SPF records
  2. Set up DKIM signing
  3. Configure DMARC policy

Solution 10: Custom email function

Use custom email function with better error handling.

Add to theme's functions.php:

functions.php
add_filter( 'somfrp_retrieve_password_message', 'custom_reset_email_with_logging', 10, 4 );
function custom_reset_email_with_logging( $message, $key, $user_login, $user_data ) {
$reset_url = som_get_lost_password_url() . '?somresetpass=true&key=' . $key . '&uid=' . $user_data->ID;

$message = '<p>Hello ' . esc_html( $user_login ) . ',</p>';
$message .= '<p>Click here to reset your password:</p>';
$message .= '<p><a href="' . esc_url( $reset_url ) . '">Reset Password</a></p>';

// Log email attempt
error_log( 'Password reset email sent to: ' . $user_data->user_email );

return $message;
}

Verification

After implementing solutions:

  1. Request password reset
  2. Check email inbox (and spam folder)
  3. Verify email received within 5 minutes
  4. Click reset link to confirm it works
  5. Check debug log for errors

Prevention

Use reliable SMTP service

  • SendGrid
  • Mailgun
  • Amazon SES
  • Gmail SMTP

Monitor email delivery

  • Install email logging plugin
  • Check logs regularly
  • Set up delivery monitoring

Maintain sender reputation

  • Use valid sender addresses
  • Avoid spam trigger words
  • Keep email content professional
  • Don't send excessive emails

What's next