• Resolved sailpilot

    (@sailpilot)


    I have a question related to the “to” email address and how to possibly change it.

    This may not be q question related to this plugin but I can’t seem to resolve this. We are using Google as the mailer with your plugin.

    We are using the plugin ‘wpDiscuz’ for comments and it does not provide a way to change the destination email address when someone sends a comment. The email goes to the admin address that is in Settings-General.

    We would like to email to be sent to a another email address.

    Their support said that all their email is sent thru the WordPress wp_mail function and suggested the following code to provide for a change in the destination email, where [email protected] should be changed to our destination address.

    add_filter('wp_mail', 'custom_email', 10, 1);
    function custom_email($wp_email) {	
    	$wp_email['to'] = '[email protected]';
    	return $wp_email;
    }

    It does not work and in fact no email arrives once this code is added to functions.php

    They suggested that I should contact you for a possible solution. Any suggestions would be appreciated. Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support Darshana

    (@darshanaw)

    Hi @sailpilot,

    Thanks for reaching out! I apologize, but the “send to” email address is not controlled through the WP Mail SMTP plugin.

    The purpose of the WP Mail SMTP plugin is to configure your “from email address” so that you can send emails using an authenticated email account.

    By default, your WordPress email notifications will be sent to your administrator email address (WordPress -> Settings -> General). You can change your administrator email address, or you can set a “send to” email address within your individual plugins.

    For example, if you’re using a plugin like WPForms, refer to their documentation on how to set a “send to” email address.

    I hope this helps. Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Changing TO email address’ is closed to new replies.