Title: Plugin isn&#8217;t logging cron mail functions
Last modified: January 25, 2018

---

# Plugin isn’t logging cron mail functions

 *  Resolved [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/)
 * (@liammcarthur)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/plugin-isnt-logging-cron-mail-functions/)
 * I’ve written a plugin that sends out emails to customers via a cron, but I’ve
   noticed that this plugin isn’t logging them particular emails, but is logging
   everything else. Is this normal behaviour? Is there no way of being able to log
   mail sent via the cronjob function?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/plugin-isnt-logging-cron-mail-functions/#post-9901272)
 * Hi [@liammcarthur](https://wordpress.org/support/users/liammcarthur/),
 * >  but I’ve noticed that this plugin isn’t logging them particular emails, but
   > is logging everything else.
 * that’s pretty clear if your plugin sends before WP Mail Logging has hooked to
   the wp_mail action. Please check that your plugin sends after this.
 * Please let me know if this points you in the right direction.
 *  Thread Starter [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/)
 * (@liammcarthur)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/plugin-isnt-logging-cron-mail-functions/#post-9905677)
 * But my plugin is using the `wp_mail` function. I’m not using a custom mail function.
    -  This reply was modified 8 years, 4 months ago by [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/).
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/plugin-isnt-logging-cron-mail-functions/#post-9911648)
 * Of course it must use the wp_mail function to be logged at all. But the point
   is: when do you send the mails? (which hook)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin isn’t logging cron mail functions’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-logging/assets/icon-256x256.jpg?rev=2562296)
 * [WP Mail Logging](https://wordpress.org/plugins/wp-mail-logging/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-logging/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-logging/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-logging/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-logging/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-logging/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [No3x](https://wordpress.org/support/users/no3x/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/plugin-isnt-logging-cron-mail-functions/#post-9911648)
 * Status: resolved