Mail Envelope From / Return-Path

I am trying to get mail properly setup, and am able to send mail. The problem is that DKIM / SPF is failing because the return-path / envelope sender isn’t being set. It is defaulting to my user account on my hosting server, rather than being properly set to the same address used in the ‘From:’ field.

I’m somewhat out of my depth here, but my host provider’s tech support thinks it is an improperly implemented mail() function.

Here are the example headers from an email sent from Backlight:

Return-Path: <kylelucy@SERVER-FQDN>
From: Kyle Lucy Photography <>


Hi Kyle, the return path @SERVER-FQDN is something your host’s mail server is setting. It may be that your host doesn’t trust the from address you are using.

Who are you hosting with? We have some steps documented that may help. They were written specifically for Bluehost users, but may also apply to other hosts. See the Sending Email section on this page:

I would check that your from address is known to your host, either through an account in the Control Panel or other means.


I couldn’t get it working using PHP mail, but switching to smtp did the trick. I’m happy enough with that that I’m not going to keep screwing around with my php.ini files and sendmail settings.

Thanks for the help,