WP Mail Log

A simple plugin that, while activated, logs all calls to the wp_mail() function to a file wp-content/wp_mail_log.

Please be advised, this file is probably publicly accessible on your server, and could well contain private information. This plugin is for debugging purposes only, I encourage you to delete the wp_mail_log file and deactivate the plugin once you’re finished with it.

If you have a support question, try posting a comment below.

Get the code here.

17 thoughts on “WP Mail Log”

  1. How can I get the advantage of this plug in in order to see the possible error in my site that cause problem of sending email.

    I can’t send the mails ( forget password, new user notification )

    Please help,

    PS: I user WP 3.1.2 and the WP SMTP plug-in installed successfully but does not apear when I click E-Mail in the settings menu..


        1. Apologies, I think I misunderstood. Have you installed the WP Mail Log plugin? It creates a log file that you can view in the plugin editor. To be honest, it’s quite technical, and so if the instructions in the plugin itself don’t make sense, I recommend you try a different debugging approach. I wrote and released this plugin because it was useful to me while debugging some people’s sites, but it’s not something I actively support, it’s really aimed at developers familiar with the WordPress stack.

            1. Not sure. I recommend checking your PHP error logs (probably the apache error log). If you can’t find anything in there, try enabling error output (not sure how to do that without researching it). Try deactivating and then reactivating the plugin. If that all fails, post on the WP Mail SMTP support page here and I’ll look into it further there.

  2. Hi,
    i want to send message with in the site members.just like a social networking sites.you have the solution of this??

  3. Callum; I have the WP_Mail_SMTP installed. We can send test messages, but our contact forms will not send out. I have installed your Log plugin and activated, but do not see any log file in the wp-content/plugins/wp_mail_log folder. Just the plugin file and a readme.txt.
    Any ideas?

    1. Is that folder writable by the web server? Or put another way, can you install the plugins with the installer through the admin, or do you need to FTP upload plugins?

      Have you tried sending a test mail with WP Mail SMTP to see if it generates a log entry?

  4. Yes, the folder is writable, I finally got a log. Not sure why it took a little bit. I will email the log to you.
    I installed the plug in from the admin.
    We are using Contact form 7 ver 3.3.1 and FormBuilder ver 0.91 (not sure why two forms).
    The test email goes through fine.

    1. I am truly sorry to have bothered you. I ultimately found out that I had “Require Sender Authentication” set for the Exchange List. I found that issue out when I called Godaddy, and they said they saw the email going out and got a security related bounce back from the email.
      I removed the check from the box on the Exchange list and all is good in the world again.
      As my sister is fond of saying… My Bad!

  5. Hi installed both your plugins… it is writing to the log file, but what am i suppose to be looking fro in the log file?

    My problem is strange as your SMTP plugin sends test message no problem, secure invite plugin worx 100%, invite anyone plugin works 100%, BP Group Mail plugin worx 100% – EXCEPT no user activation or joining emails are being sent

    1. Check if the emails that are failing are being logged. If they are not, then they’re not generating a call to wp_mail(), that’s your problem. If they are logged, maybe there’s some info as to what’s going wrong with them.

  6. Hi Callum,
    I am facing the same issue as above, I have activated the WP Mail plugin and when I click on”Send mail” it works fine and I get the email. However when I click send on the contact form I get yellow bordered error – Failed to send your message. Please try later or contact the administrator by another method.

    I installed WP Mail Log and activated the plugin but cannot see any logs in wp-content\wp_mail_log folder. I am running WordPress 4.4.2 on IIS 8.5

Leave a Reply

Your email address will not be published. Required fields are marked *