Sending e-mail via PHP, on behalf of someone else

你说的曾经没有我的故事 提交于 2019-12-07 05:04:52

问题


I would like to create a form that allows users to contact our local city council. I want to make it easy, so they can just fill out the form and send it. I am just not 100% sure how this would work in regards to spam filtering.

  1. I know how to send e-mail through php usind sendmail, and also via Google Apps smtp server.

  2. Mail from our domain has both SPF and DKIM applied, and it is working correctly

What I'm wondering is if someone fills out the form and we use their e-mail address in the from field will it be blocked as spam?

I am not sure how the verification that we have set up to verify mail from our domain will affect mail sent from our server, with a from address that has a different domain.

Any ideas?


回答1:


It will most likely be treated as spam as your local mailserver will not feel responsible for sending mail from a domain it does not serve. You can however use a default from address (like noreply@example.com - just use some domain your mailserver is responsible for) and use the reply-to field for the email address of your user.



来源:https://stackoverflow.com/questions/8204050/sending-e-mail-via-php-on-behalf-of-someone-else

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!