• Resolved Johann ROCHE

    (@johannroche)


    Hi,

    I have a custom function that let me send email by PHP with the wp_mail() function.

    I receive email, so i know they are working, but i don’t see them in the logs.

    Any idea ?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dake

    (@dakeg)

    Hi @johannroche

    Thanks for reaching out to us and we’re sorry to hear that the emails sent via your custom function are not being logged.

    I will check this with our developers, but for reference, may we see the custom code you used? Be sure to replace any personal information (like your email address) with a generic alternative.

    Thread Starter Johann ROCHE

    (@johannroche)

    Hi

    I use this function :
    wp_mail( $to, $subjectEmail[$language], $bodyEmail, $headers, $attachments );

    you think it’s wrong ?

    Plugin Support Dake

    (@dakeg)

    Hi @johannroche

    Thank you for sharing your custom code.

    Just to confirm do all other emails on your website get logged? For example, contact form emails or WordPress core emails like password reset.

    Also, are you sending that email before all plugins are loaded?

    WP Mail Logging is unable to intercept emails that get sent before all plugins are loaded. Depending on how you are implementing that email feature, please note that all plugins should load their functionality on the “plugins_loaded” hook, especially if they relay to some other plugin functionality.

    Thread Starter Johann ROCHE

    (@johannroche)

    Make sense !
    The code is used in a plugin named Snippet. I think this code is executed before.
    Thanks

    Plugin Support Dake

    (@dakeg)

    Hi @johannroche

    You’re welcome, glad we could help.

    Have a great weekend ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Email sent by PHP with wp_mail() function are not logged ?’ is closed to new replies.