Jump to content

E-mail form with third party recipient


rarebear

Recommended Posts

Hi,

 

I have a client that wants an e-mail form on a activist website where the recipient is a government office.

 

The idea is that we would pre-compose a message and let the visitor fill in his/her name and e-mail address. An e-mail would then be sent from our mail server ([email protected]) with Reply-To set to the visitors e-mail address.

 

Is this at all possible? Is it ethical? (our purposes are noble) How long would it take for us to get blacklisted?

 

I realise that the best solution would be to make the visitor copy and paste the email, but my client really wants this solution. Plus that we want som way to keep track of the amounts of e-mails being sent.

 

Thank you.

Link to comment
https://forums.phpfreaks.com/topic/279114-e-mail-form-with-third-party-recipient/
Share on other sites

To help avoid blacklisting, you could consider using a plain "mailto" link:

<a href="mailto:[email protected]?subject=This is the Subject&body=This is the content of the email.">Email Link</a>

This would open the message in the visitor's e-mail client and sent out by them. Note that this solution is geared toward e-mail clients like Microsoft Outlook. You would need to provide an alternative for those using web clients like Yahoo Mail...maybe a copy/paste solution.

 


Is this at all possible?

 

You could create a HTML form to send out the e-mail from your server. Note that there are many tutorials online for pre-populating forms:

https://www.google.com/search?q=php+pre-populating+forms

 

Just be aware that this has a greater potential as being marked as spam. Also, if you choose to go this route, be aware of e-mail injection attacks:

https://www.google.com/search?q=php+email+injection

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.