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');
}
Note that I am sending email to my own email address - so I can check the spam folder, etc.
What am I missing?