I am using the wp_mail function within WordPress, but it only works sometimes. When I look at the error log, it says that mail is succeeding. This function is also being used for another email being sent – but that one works (at least sometimes, anyway).
if ( wp_mail( $emailTo, $subject, $body, $headers ) ) {
error_log('mail success');
} else {
error_log('mail fail');
}
What am I missing?