That’s not the issue. The email arrives, but sent from the server.
If you’re in WP, you should only send mail using wp_mail.
I have a smtp config to send through sendgrid. SO if I use mail I’m gonna be use my server’s postfix/exim config. While if I use wp_mail I’m gonna be sending through sendgrid.