Update:
We received this reply (solution) from Rank Math (via WP forum), but it did not work.
Please review and provide a solution that works. Also, please add a button to your plugin so we can send test emails. Very beneficial, will allow us to determine if our SMTP settings are working correctly with your plugin.
Thank you!
Hello,
Thank you for contacting Rank Math, and sorry for any inconvenience caused.
You can run the scheduled task manually to send the test email.
Go to WordPress dashboard > Tools > Scheduled Actions > Pending:
Run the rank_math/analytics/email_report_event
scheduled action.
I hope this helps. Looking forward to helping you.
@Anas,
Yes, thank you. That worked. We also found a way to make it work using advice from previous support agent.
Also, as stated above, can you guys add a button to your plugin so we can send test emails?
Thank you!
Hello,
I am glad that we could address your issue.
As for the test button you have suggested, I agree this is a very logical feature to have.
With that said, I have shared your input with our dev team. Let’s hope this will be considered.
In the meantime, please don’t hesitate to contact us anytime if you need our assistance with anything else. Thank you
Please add a function to choose the date/time a report goes to a client!
Hello @tomclarke,
Thank you for reaching out to us and we appreciate your input to further improve our email reporting feature.
At the moment, you can only choose the frequency to adjust the timeframe:
We have noted your suggestion.
Please do not hesitate to let us know if you need our assistance with anything else.
Hi Jeremy,
Since this topic was re-opened (hijacked) by @tomclarke, can you kindly provide the status of our request?
When is the “Send Test Email” button going to be added to your plugin? It’s been over a year since we requested this much-needed feature or enhancement.
Details: https://prnt.sc/1aam3u2
For all practical purposes, this topic is not resolved, so re-opening it.
Thank you!
Hello,
I checked with our dev team and given that we have the URL and Scheduled action methods to trigger the email, and as that button would not be regularly used by the majority of the users, we’re unable to add it.
However, you can add the below code to your website to get a Send Email
link below the “Additional CSS code” field of the Email Reports under Rank Math > General Settings > Analytics:
add_action( 'rank_math/admin/settings/analytics', function( $cmb ) {
$email_field = $cmb->get_field( 'console_email_custom_css' );
if ( ! $email_field ) {
return;
}
$email_field->args['description'] = $email_field->args['description'] . '<br /><br /><a target="_blank" href="'. home_url( '?rank_math_analytics_report_preview=1&send=1' ) .'">Send Email</a>';
} );
Here’s how you can add the code: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope this helps.
Thank you.
Hi Prabhat,
Thank you for the reply and the code snippet.
Unfortunately, your code snippet does not work — plus — there is no “Additional CSS code” field in Rank Math > General Settings > Analytics.
Details: https://prnt.sc/lPO8yomMDM-w and https://prnt.sc/blN9sBQ1pPNk
Last, what is your basis to state that the majority of users would not use the requested button, “Send Test Email”? We never received a survey from Rank Math.
Thank you!
Hello,
That code snippet assumes that you have the Business subscription which is where the “Additional CSS” section is added.
In this case, you can replace the field that is getting targeted with the following one: console_email_frequency
As for the decision to not include the button, this was shared with the dev team and they along with the product team decided that this feature would not be included in the plugin.
Don’t hesitate to get in touch if you have any other questions.
Hi Miguel,
Thank you for the update and code revision. It worked.
One small, final request:
When we click on the new link “Send Test Email” (we changed it from “Send Email”), a new tab opens up in our browser and our home page is displayed.
Can your code be adjusted to open our SEO Report preview page instead? (same as when we click on the link, “the preview here“)
Thank you and apologies if my last note came across as rude.
Jonathan
Hello,
The URL that is used to send the email report for testing includes a die()
call at the end to prevent the script from continuing running and make sure the script doesn’t hang on the website and consume extra resources.
That’s why it gets redirected to the homepage after sending the report.
Unfortunately, changing this behavior at the moment is not possible without engineering another solution completely different to send the email reports to the email.
Don’t hesitate to get in touch if you have any other questions.
Hello,
Glad that helped.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.