开发者

Sending emails from a web site, when the users also use Google Apps

开发者 https://www.devze.com 2023-04-13 06:58 出处:网络
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.

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 user1@client.com, user2@client.com, etc. The client is using Google Apps for busi开发者_如何学JAVAness for their user emails (like user1@client.com).

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., user2@client.com.

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 (this is why it's a programming question), how can we ensure that the email, while sent from our server.com, still says "From: user2@client.com" ?

Thanks!


For part 1. just do v=spf1 a include:_spf.google.com ~all This assumes that client.com has the A record set to server.com

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号