0

[Asked this on stackoverflow and was referred here]

We are developing a custom web app for a client. This app is on a separate server, server.com, than the client's web site, www.client.com. Each user of our app has an email address like [email protected], [email protected], etc. The client is using Google Apps for business for their user emails (like [email protected]).

Now here's what we need: Each user needs to be able to send certain emails to people on his contact list. Those emails are from our box, server.com. But we want the From and Reply-To address to be the user who sent it, e.g., [email protected].

How can we set up our box, server.com, to be an authorized sender of emails from "client.com"? I looked up the SPF record for Google apps, and it is:

v=spf1 include:_spf.google.com ~all

(1) How do we add "server.com" to this SPF record?

(2) From PHP, how can we ensure that the email, while sent from our server.com, still says "From: [email protected]"?

Thanks!

1

1 Answer 1

3
v=spf1 a:server.com include:_spf.google.com ~all

That allows the device(s) that server.com resolves to.


PHP builds the message envelope completely independently of the hostname of the device that it's sent from. Set the headers correctly in your code, the SMTP relay that it comes from is of no significance for the apparent sender.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .