Title: Using wp_mail in a plugin
Last modified: August 18, 2016

---

# Using wp_mail in a plugin

 *  [drzax](https://wordpress.org/support/users/drzax/)
 * (@drzax)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/using-wp_mail-in-a-plugin/)
 * Ok, so I’m trying to use wp_mail(), get_currentuserinfo() and possibly a couple
   of other pluggable functions in a plugin I’m writing. This presents a problem
   because (obviously) the plugin code is loaded before the pluggable functions.
   Is there any way to get around this?
 * S.

Viewing 1 replies (of 1 total)

 *  [skippy](https://wordpress.org/support/users/skippy/)
 * (@skippy)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/using-wp_mail-in-a-plugin/#post-228656)
 * If your plugin is _doing something_ as soon as it’s loaded, then no: there’s 
   no way for you to rely on `wp_mail()` and `get_currentuserinfo()`. The functions
   in pluggable-functions.php are expressly designed to be overriden by plugins,
   and therefore load after all plugins load.
 * If you can reconfigure your plugin to _do stuff_ after pluggable-functions is
   loaded, you might be better off.

Viewing 1 replies (of 1 total)

The topic ‘Using wp_mail in a plugin’ is closed to new replies.

## Tags

 * [pluggable](https://wordpress.org/support/topic-tag/pluggable/)
 * [wp_mail](https://wordpress.org/support/topic-tag/wp_mail/)

 * 1 reply
 * 2 participants
 * Last reply from: [skippy](https://wordpress.org/support/users/skippy/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/using-wp_mail-in-a-plugin/#post-228656)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
