• Resolved jayharland

    (@jayharland)


    I love this plugin. Recently, I’ve been using it to run scheduled backups. When the backup runs I get an error “You must provide at least one recipient email address.”

    However, my backups are set to store locally only, not locally and email.

    Before asking here I searched for that error message and could only find one post with the same error, but it did not address or resolve my issue.

    From the error details you can see it’s just an empty array in the To field:

    data => Array
        error => Object WP_Error
            errors => Array
                wp_mail_failed => Array
                    0 => You must provide at least one recipient email address.
            error_data => Array
                wp_mail_failed => Array
                    to       => Array()
                    subject  => [mydomain.com] 
                    message  => ...

    I’ve tried:

    • Changing the default notification address to a specific admin.
    • Disabling, deleting, and reinstalling the plugin.
    • Creating a different admin user to test if an underscore in the username was causing it to be removed when sanitized for some reason.
    • Disabling all plugins except Better WP Security.
    • Changing to default theme.

    Other email sent from WordPress arrives normally; notices from WordPress about user changes and contact forms for example.

    Any help would be appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jayharland

    (@jayharland)

    To follow up, if I change my backup settings to “Store Locally and Email”, I receive the emails normally.

    The problem is I do not want to receive emails with the backup attached since I backup the entire server weekly, as well as the individual websites every other day. I don’t need them in my email as well.

    Probably a bug. Unregardless the value chosen for the Backup Method setting, manually creating a Database Backup will ALWAYS try to send an email.

    Possible values for the Backup Method setting:

    0 = Save Locally and Email
    1 = Email Only
    2 = Save Locally Only

    In the better-wp-security/core/modules/backup/class-itsec-backup.php file:

    ...
    if ( 2 !== $this->settings['method'] || true === $one_time ) {
    	$mail_success = $this->send_mail( $file );
    ...

    If you remove the:

    || true === $one_time

    part, manually creating a backup while the Backup Method is set to “Save Locally Only” should work just fine.

    To prevent any confusion, I’m not iThemes.

    Thread Starter jayharland

    (@jayharland)

    Thank you for the help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_mail_faild: You must provide at least one recipient email address.’ is closed to new replies.