• Resolved Nimbus Digital

    (@nimusdigital)


    I have a plugin that sends mail from the WordPress admin and the front end.

    With WP Mail SMTP installed and configured for SendGrid, mail is sent via SendGrid on the front end, but when admin mail is sent via wp_mail() SendGrid is bypassed. I have verified this by checking SendGrid activity log.

    The admin messages are triggered via an action when my admin page is loaded:
    add_action( 'plugins_loaded', 'sendMessages' );

    I can’t figure out why WP Mail SMTP is not intercepting the admin mail. Any help appreciated?

Viewing 1 replies (of 1 total)
  • Thread Starter Nimbus Digital

    (@nimusdigital)

    Thanks for all your help!

    I have moved my mail function to the admin_init hook. This works…
    add_action( 'admin_init', 'sendMessages' );

Viewing 1 replies (of 1 total)

The topic ‘Failure using WP Mail SMTP within admin’ is closed to new replies.