Hello,
Thank you for developing this plugin, it’s really useful.
I have seen lately that there’s a warning(~20 lines of the same warning) showing on the settings page where the email logs are present :
Warning: foreach() argument must be of type array|object, string given in /REDACTED/wp-content/plugins/simple-smtp/src/log/class-log.php on line 169
It still however shows the email log after these warnings.
Can you please take a look at it.
Thank you.
Wishing you a great day !
]]>First, thanks a lot for Simple SMTP, which is precisely what we need.
However, after installing Simple SMTP, we noticed that non-recent posts from a custom post type (“lesson”) started to disappear. Investigating the issue, we found that a WP Cron job installed by Simple SMTP was responsible, wpss_clear_logs
in particular.
I could reproduce that behaviour even after I disabled all plugins save for the two plugins needed to define the custom post type, namely, Seriously Simple Podcasting (SSP) and Audiothek (a non-public plugin of our own) and the two plugins I used for debugging, Activity Log, and WP Crontrol. Activity Log and WP Crontrol were not installed when the behaviour occurred originally, so if this is an interaction effect, it is an interaction effect with SSP and/or Audiothek.
When I changed
foreach ( $all as $log ) {
wp_delete_post( $log->ID );
}
in simple-smtp/src/log/class-logservice.php:227 to
foreach ( $all as $log ) {
/* wp_delete_post( $log->ID ); */
error_log("DEBUG: {$log->ID} ({$log->post_type})");
}
and triggered wpss_clear_logs
using WP Crontrol, I got:
tail -f wp-content/debug.log
[28-May-2024 10:43:43 UTC] DEBUG: 4956 (lesson)
<repeats ca. 2,000 times for different posts>
However, when I added
error_log("DEBUG: {$this->post_type}");
to the beginning of LogService::prune_logs()
at simple-smtp/src/log/class-logservice.php:216 and trigger wpss_clear_logs
, I got:
tail -f wp-content/debug.log
[28-May-2024 10:43:43 UTC] DEBUG: sbss_email_log
I wondered whether get_posts
uses “OR” to connect “post_type” and “date_query”, but that clearly is not so: Firstly, only old posts of our custom post types are deleted, not all posts. Secondly, posts of other types are not deleted at all (though I did not check whether they are just not old enough; there is also a lot of work on our site at the moment, so I might have missed a deletion).
At this point, I strongly suspect that our “pre_get_posts” filter for adding “lesson” to the main loop is responsible:
/* Add CPT_LESSON to the main loop. */
add_action(
hook_name: 'pre_get_posts',
callback: function (\WP_Query $query): \WP_Query {
if ($query->is_home()) {
$post_types = $query->get('post_type');
if (is_array($post_types)) {
$post_types[] = CPT_LESSON;
} else {
$post_types = [$post_types, CPT_LESSON];
}
$query->set('post_type', $post_types);
}
return $query;
}
);
Note that this code is only called for the front-end, though perhaps wp-cron.php qualifies as front-end. However, $query->is_home()
should return false
for get_posts
when called by wp-cron.php, shouldn’t it?
I’ll update, and likely close, this issue once I had the time to check this. In the meantime, any input is appreciated, of course.
]]>Hello and thank you for developing this plugin, it is realy useful ??
Can you please add a field in the plugin config where we can set manually the reply-to address? For example my emails are going out through a “noreply@” email account and I wish to give my clients a way to reply to the email notification they received (for example to a contact@ or support@…) but at the moment I cannot set this option.
Some plugins that are sending out email notifications, like WooCommerce add the reply-to header so it might be good to do a check before replacing it with the email added in the plugin.
Thank you !
]]>Due to time restrictions, I’m not able to give enhancement requests the full time consideration they ordinarily need. For now, the plugin is in a bugfix-only state. The plugin is still supported and will still receive bug and security updates for the foreseeable.
You can read more about why here.
]]>Forgive my English but I am translating, just for the information of the creators of this really free plugin, the Google Gmail password gives an error and you must follow these steps for it to work.
Greetings
Hi,
I am trying to use this plugin with Gmail SMTP, port 587 but with no success.
The error given is: Test email failed. Please check your configuration and try again.
There are 2 fields I do not know what to enter there:
For the other fields: I have checked Authenticate and filled in the Gmail email and password.
Can you help me to get it working, thank you.
]]>Hi,
I am not sure that I understood it correctly.
Does the SMTP_DISABLE stops emails from being sent?
So is it meant for staging or development sites?
Thanks
]]>Hi,
When using environment variables or setting the SMTP_* credentials in wp-config.php the values are displayed, albeit greyed out, in the WordPress Simple SMTP settings page of WP Admin.
Would it be possible to mask or simply not display any credentials/settings in WP Admin? The reason for setting the credentials as environment variables is to add extra security. These values should not be displayed (or maybe have an option to display values or not).
Kind regards,
]]>Can I have these features?
Ability to add unlimited SMTP accounts and allow sending from the same email address.
Rotate the sending method from multiple methods per second, minutes, per hour, per day (to avoid the free limit of SMTP providers such as Gmail).
Limit sending amount per second, minutes, per hour, per day (to avoid the free limit of SMTP providers such as Gmail).
]]>Hello,
How to send a test email please?
Thanks.
]]>After uploading the php version to 8.2 some warnings have appeared:
Deprecated: Creation of dynamic property wpsimplesmtp\Singular::$log_service is deprecated in ***\wp-content\plugins\simple-smtp\src\settings\class-singular.php on line 69
Warning: Cannot modify header information – headers already sent by (output started at C:\wamp64\www\demoportal\wp-content\plugins\simple-smtp\src\settings\class-singular.php:69) in ***\wp-includes\functions.php on line 6896
Warning: Cannot modify header information – headers already sent by (output started at ***\wp-content\plugins\simple-smtp\src\settings\class-singular.php:69) in C:\ wamp64\www\demoportal\wp-admin\admin-header.php on line 9
Can you help me with that? Thank you!!
]]>hi there,
Could you please add some features if possible?
This plug-in is simple enough, clean, I really like it, but I found that the mail log feature at the bottom of the configuration interface is confusing in the mobile terminal, I am a little frustrating. Can you fix this next time update?
]]>Hi!
Is it possible to release or tag a release as stable, so that the translations will get distributed? Thanks for a great and simple plugin!