Suppress errors with "@" before wp_mail causes errors in third party plugins
-
I’m getting a fatal error if a third party plugin “highjacks” the native wp_mail function and CF7 sends a mail.
I’ve tracked down the issue to line 561 in includes/classes.php where you prevent errors with this line
return @wp_mail( $recipient, $subject, $body, $headers, $attachments );
while it should be
return wp_mail( $recipient, $subject, $body, $headers, $attachments );
appending @ is bad practice in general
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Suppress errors with "@" before wp_mail causes errors in third party plugins’ is closed to new replies.