Changing TO email address
-
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.
- The topic ‘Changing TO email address’ is closed to new replies.