Sending email via PHP, on behalf of someone else

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 submit it. I'm just not 100% sure how this will work in relation to spam filtering.

  • I know how to send email through php usind sendmail, as well as through the smtp server of Google Apps.

  • Mail from our domain has both SPF and DKIM, and it works correctly

What I’m interested in is if someone fills out a form and we use their email address in the from field, will it be blocked as spam?

I am not sure how the scan that we set to check mail from our domain will affect mail sent from our server with an address that has a different domain.

Any ideas?

+4
source share
1 answer

Most likely, it will be considered as spam, since your local mail server will not be responsible for sending mail from a domain that it does not serve. However, you can use the default from address (for example, noreply@example.com - just use some domain that your mail server responds to) and use the reply-to field for your user's email address.

+3
source

Source: https://habr.com/ru/post/1382167/


All Articles