• Resolved Refine Graphics

    (@refine-graphics)


    Hi there,

    We have an email log (Post SMTP) that is set to hold 250 sent emails, with the oldest emails being deleted from the log as new ones are sent.

    Simple History sometimes attributes these “deleted sent email” actions to “Other,” other times to “WordPress,” and lately, we have seen them attributed to customer accounts.

    This last seems quite alarming as customer accounts should not have access to the email log at all.

    It’s not easy to tell in the history log if these “deleted sent emails” are in fact the oldest emails automatically being deleted, or if they are being deleted manually somehow by customer accounts.

    While I know it’s probably a combo factor of how Post SMTP works + the way Simple History works, I’m wondering if you can provide some possible clarity as to
    a) if we can safely surmise these are all just automatic, old sent email deletions
    b) why these email deletions are attributed to various different sources?

    Thanks very much in advance!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author eskapism

    (@eskapism)

    Do you have a link to the plugin you are using? Maybe I can take a look how it works and find some more info about this behaviour.

    My guess is that the plugin that is deleting those emails are doing this automatically at certain intervals, and sometimes these intervals happen when a user that is not you or WordPress is using the site.

    You can try to view more details about an event, maybe something there can give you an hint on what’s going on.

    Thread Starter Refine Graphics

    (@refine-graphics)

    Hiya, thanks for your reply. The Post SMTP plugin can be found here: https://www.ads-software.com/plugins/post-smtp/

    Plugin Author eskapism

    (@eskapism)

    I quickly checked the source code of the plugin, and while I don’t understand how it works in full, I believe whats happening is that when an email is sent the plugin calls a function called writeToEmailLog() that “Writes an email sending attempt to the Email Log” and at the end of that function another function called truncateLogItems() is called and that function does deletes posts from the “Sent Emails” post type.

    So technically the deletion is done when an email is sent when someone who is not an admin is doing something on the site that is causing an email to be sent. And the deleted email log item are not related to the current user, it’s just the oldest log items that are deleted. So I think this is nothing to worry about.

    Thread Starter Refine Graphics

    (@refine-graphics)

    Thanks @eskapism this is kind of what I figured, but did not have the skills to look into it. Appreciate your time investigating!

    I get a lot of these notices as well, because I have a couple of cron jobs that generate wp_mail. How can I filter these events from appearing in the log?

    Looking at the database now, it’s a post_deleted _message_key, and the post_type is postman_sent_mail

    Maybe I could filter on those or the post_title and not log in these cases?

    • This reply was modified 1 year, 9 months ago by ttremain.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[customer name] deleted sent email: [subject]’ is closed to new replies.