diff --git a/wp-mail.php b/wp-mail.php index f5f55a6..e20f896 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -195,9 +195,12 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() $response = wp_remote_post( 'https://api.postmarkapp.com/email', $args ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { + do_action('postmark_error', $response, $headers); Postmark_Mail::$LAST_ERROR = $response; return false; } + do_action('postmark_response', $response, $headers); + return true; }