--- a/wp/wp-mail.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-mail.php Fri Sep 05 18:52:52 2025 +0200
@@ -39,12 +39,20 @@
$last_checked = get_transient( 'mailserver_last_checked' );
if ( $last_checked ) {
- wp_die( __( 'Slow down cowboy, no need to check for new mails so often!' ) );
+ wp_die(
+ sprintf(
+ // translators: %s human readable rate limit.
+ __( 'Email checks are rate limited to once every %s.' ),
+ human_time_diff( time() - WP_MAIL_INTERVAL, time() )
+ ),
+ __( 'Slow down, no need to check for new mails so often!' ),
+ 429
+ );
}
set_transient( 'mailserver_last_checked', true, WP_MAIL_INTERVAL );
-$time_difference = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
+$time_difference = (int) ( (float) get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
$phone_delim = '::';