Sending Emails on Redirections
-
Hi,
Seeing as there are no logs recorded for redirections, I decided I’d have a play with the email settings as mentioned in the FAQ.
So I set up the emails as per the code in there:
// Do something after a redirection add_action('wp404arsp/after_redirect', 'my_404_after_redirect'); function my_404_after_redirect($query){ // Developers: Print $query array for more request context // Send me an e-mail wp_mail( '[email protected]', 'WP 404 Auto Redirect: New redirection', 'Hi! New redirection from ' . $args['request']['url'] . ' to ' . $query['redirection']['url'], array('Content-Type: text/html; charset=UTF-8') ); return; }
…and swapped the ‘myemail’ bit for my own email address.
On getting a few site-links completely wrong (for testing purposes), all I received in the email was:
Hi! New redirection from to
…so I’m obviously missing something.
What is it that I’m missing?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Sending Emails on Redirections’ is closed to new replies.