Your contact form notification and your WooCommerce order email are both sent by wp_mail() . If they land in spam, the mail content is usually not the first thing to fix. The first thing is authentication: the receiving mail server needs to know that the message really came from your domain.
The order below is about avoiding rework:
Decide the sending domain and the SMTP relay.
Route WordPress mail through that relay.
Publish SPF for the relay.
Publish DKIM for the domain in the From header.
Add DMARC last, starting in monitoring mode.
Test the real WordPress paths: form notification and order email.
SPF and DKIM can be done in either order once the relay is known. DMARC should come last because it reads the SPF and DKIM results.
1. Decide the sender identity first
You need three addresses before you touch DNS:
Role Example Rule
Visible From [email protected] A domain you control. Not a free-mail address.
Return-Path / envelope sender [email protected] The address that receives bounces.β¦