Email sending no longer works
-
Email notification seems to be broken. Every time an email tries to be sent, I get the following error in the logs:
id => 38675 module => notification_center type => error code => send_failed::file-change timestamp => 2023-12-08 14:23:04 init_timestamp => 2023-12-08 14:23:02 remote_ip => 127.0.0.1 user_id => [empty string] url => wp-cron memory_current => 38359080 memory_peak => 44775824 data => [Too large to display]
How can I fix this?
-
Hi @ayntk, thanks for reaching out!
The error details are missing the error message and description.
Can you confirm if the error is referencing something about a missing recipient? If so, please make sure there is an assigned Default Recipient in Security > Settings > Notifications to see if it helps.If it’s a different error, please paste the complete error details here or take a screenshot and send it here.
Looking forward to your reply!
I choose to send it to all admin users so there is a recipient, but it is still not sending emails:
id => 39037 module => notification_center type => error code => send_failed::file-change timestamp => 2023-12-13 14:16:03 init_timestamp => 2023-12-13 14:16:01 remote_ip => 127.0.0.1 user_id => [empty string] url => wp-cron memory_current => 35692832 memory_peak => 42356376 data => Array error => Object WP_Error errors => Array wp_mail_failed => Array 0 => You must specify at least one recipient. error_data => Array wp_mail_failed => Array to => Array() subject => [site] File Change Warning
Error code of my SMTP plugin:
{ “code”: 400, “message”: “You must specify at least one recipient.”, “errors”: [ “You must specify at least one recipient.” ] }
Hi @ayntk, which SMTP plugin are you using? Can you please ensure that a valid email address is specified in the recipient setting? If the SMTP setting requires authentication, can you double-check that the credentials are correct?
If the issue persists, please enable Solid Security’s Debug feature by following this guide: How Do I Enable Solid Security Debug?
Once enabled, please go to Security > Debug page, and in the Settings section, load thenotification-center
module and paste the information here.
Looking forward to your reply!I have all “Administrator” users as the default recipient and there is a valid email in my Admin account. The credentials are correct as all other email sending works. I am using Fluent SMTP.
Debug enabled:{ "last_sent": { "digest": 1702283342 }, "resend_at": { "digest": 1690424859 }, "data": { "digest": [ { "type": "file-change" } ] }, "last_mail_error": "You must specify at least one recipient.", "from_email": "", "default_recipients": { "user_list": [ "role:administrator", USERID ] }, "notifications": { "digest": { "schedule": "weekly", "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "default", "subject": "Weekly Security Digest" }, "lockout": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "default", "subject": null }, "malware-scheduling": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "default" }, "file-change": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "default", "subject": null }, "two-factor-email": { "subject": null, "message": "" }, "two-factor-confirm-email": { "enabled": true, "subject": null, "message": "" }, "hide-backend": { "user_list": [ "role:administrator" ], "recipient_type": "default", "subject": null, "message": "" }, "two-factor-reminder": { "subject": null, "message": "" } }, "admin_emails": [] }
@ayntk, thanks!
On these settings:digest, lockout, malware-scheduling, file-change, hide-backend
– can you edit all therecipient_type
value to “custom” instead of it showing as “default”?
Once done, save the module settings and click the “Force” button below in Notification Center > digest to check if the error persists.
Please let me know how it goes.Once done, save the module settings and click the “Force” button below in Notification Center > digest to check if the error persists.
That probably won’t work (fails validation) since USERID is not a valid (“default_recipients”) “user_list” value. Not sure how that value got there in the first place ??
To move this issue forward I think we need to remove the USERID value. It’s probably the safest to use the Security > Settings > Notifications UI to reset (toggle off > Save All Changes, toggle on > Save All Changes) the Default Recipients “user_list” value(s). Then check the notification-center setting from the Debug page to make sure the invalid (“default_recipients”) “user_list” USERID value is gone.
The USERID was for privacy reasons, the Admin User ID was there, sorry should have mentioned that I redacted it. How can I manually trigger a file change email or a new vulnerability detection email because all other emails are already working?
@ayntk, thanks for clarifying!
You can manually edit a plugin/theme file and wait for the scheduled site scan or you can go to the Security > Debug page and click the “Reset” button beside theITSEC_Scheduler_Cron
and after clicking it, click the “Run” button for thefile-change
module under the Scheduler list.
On my test site, I edited the WP theme’s style.css -> reset the plugin’s scheduler -> ran the file change module -> waited a few minutes to receive the notification and view the?log.
Let us know if that helps.Did not work, changing the recipient to custom did nothing, 3 days in a row file change warning failed again:
Fluent SMTP error code:
{ "code": 400, "message": "You must specify at least one recipient.", "errors": [ "You must specify at least one recipient." ] }
In debug there is this:
{ "last_sent": { "digest": 1702561418 }, "resend_at": { "digest": 1702583009 }, "data": { "digest": [ { "type": "file-change" } ] }, "last_mail_error": "You must specify at least one recipient.", "from_email": "", "default_recipients": { "user_list": [ "role:administrator" ] }, "notifications": { "digest": { "schedule": "weekly", "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "custom", "subject": "Weekly Security Digest" }, "lockout": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "custom", "subject": null }, "malware-scheduling": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "custom" }, "file-change": { "enabled": true, "user_list": [ "role:administrator" ], "recipient_type": "custom", "subject": null }, "two-factor-email": { "subject": null, "message": "" }, "two-factor-confirm-email": { "enabled": true, "subject": null, "message": "" }, "hide-backend": { "user_list": [ "role:administrator" ], "recipient_type": "custom", "subject": null, "message": "" }, "two-factor-reminder": { "subject": null, "message": "" } }, "admin_emails": [] }
And in the logs
id => 39321 module => notification_center type => error code => send_failed::file-change timestamp => 2023-12-17 12:56:03 init_timestamp => 2023-12-17 12:56:01 remote_ip => 127.0.0.1 user_id => [empty string] url => wp-cron memory_current => 35610744 memory_peak => 42375544 data => Array error => Object WP_Error errors => Array wp_mail_failed => Array 0 => You must specify at least one recipient. error_data => Array wp_mail_failed => Array to => Array()
Default Recipients: All “Administrator” Users
-> One thing I noticed is that if I select the specific admin individual, then check it a day or two later, it is unchecked again by itself, but the all Admin setting should also work with all my admin users.
@ayntk, I see. At this point, I’d suggest proceeding with a conflict check. If that does not help, try re-installing a fresh copy of the plugin and make sure to select a Default Recipient in the Security > Settings > Notifications settings, and leave all the other notifications’ recipients to the default “Default Recipients” value.
Let us know if that helps!Can I somehow export the settings and reinstall them as I do not want to reconfigure the hole plugin?
Hi @ayntk, the Import & Export functionality is only available on the Solid Security Pro version.
I appreciate your understanding!Hi @ayntk, I’m checking in here to see if the conflict check/re-install helped with the email-sending issue.
Due to inactivity, I’ll be marking this post resolved. If you still need help, feel free to open a new support topic, and we’d be happy to assist.
Thank you!
I have reinstalled twice now and email is still not working. And I think I can pinpoint the problem. When I select and admin user, the user is not recognized as an admin user. When I add my username to the admin user group of solid security, it does not stay there and so the notification check for all admins does not work because the plugin thinks there are no admins. I use the following plugin for user roles and I think your plugin has a problem with this plugin that prevents the plugin form from recognizing what admin users are:
https://www.ads-software.com/plugins/advanced-access-manager/
- The topic ‘Email sending no longer works’ is closed to new replies.