So I'm not having much luck finding information on how to send email with custom From header without being potentially marked as spam (for email spoofing).
The reason we want to do this is we run a server for many client's websites, but we don't host their emails is most cases. We wish to send enquiry emails from the websites using their preferred address (e.g. sales@mycompany.com) so that their customers can reply to the email.
At the moment we're using a Google Apps email address and changing the Reply-To header, but this is ignored by Outlook almost all the time (not sure why).
In most cases we have access to the DNS records, so is it as simple as adding our server's IP address to the domain's SPF record? Or should we look at a third-party solution for this?
Thanks in advance!
Yes you need to add SPF records to the DNS TXT record. So if you want to send an E-mail as user@foo.bar from IP address 192.168.3.4 you need to create (if you are not the admin of foo.bar) a DNS TXT record/s for foo.bar as such
v=spf1 +ip4:192.168.3.4 -all
This tells the remote server that the foo.bar domain sends legitimate email from 192.168.3.4 and that all other sources are only pretending to be foo.bar.
Note that the IP can be either ip4 or ip6.