---
date: 2025-04-19T02:54:27+00:00
modified: 2025-04-19T02:54:27+00:00
permalink: https://kaspars.net/note/mastodon-social-114363076915051421
post_type: note
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
---

# On April 19, 2025 at 05:54

Are you getting "SPF alignment issues" or "spf=neutral" for emails sent by WP?

Turns out that wp\_mail() doesn't set the Return-Path email header which leads to PHPMailer populating that from the php.ini sendmail\_from setting. While that is correct, email clients these days expect the FROM domain, Return-Path and DKIM p= domain to be equal to pass the DMARC checks.