PDA

View Full Version : Best way to set up forwarders and autoresponders



mrredpants
04-13-2004, 04:58 PM
I am just setting up my email accounts.
Here's what I'd like to do. I would like clients to be able to email me from my website. They fill in a form and the an email is sent to an email address - e.g. client@domain.com

Then, I would like an autoresponse sent to them, but, from an address that they cannot respond back to.

At the same time, I would like the email forwarded to a second email address - it is from this address that I will respond to the client and that they will be able to communicate with me. At the same time, I haven't decided, but, I may want to limit their ability to communicate with me via direct email and would rather that they always go back to the website to send communications. Can you have an email address that I can send an email from the the person CAN'T respond to?

Maybe I am making this too complicated - or there is a FAQ I'm missing, but, any ideas for the ideal way to set this up would be appreciated.

DirectAdmin Support
04-14-2004, 12:24 PM
Hello,

You could try setting the "Reply-To:" header in the email sent to them. Specify an email address (Eg: noreply@domain.com) and create a forwarder to :blackhole: . Have your script also send out another duplicate to the email address you want to use.

Sample script (untested):


<html>

<?php

if (isset($_POST['email']))
{
mail($_POST['email'], "Autoreply: ".$_POST['subject'], "Thanks for your email, we'll get back to you.", "Reply-To: noreply@domain.com");

mail("youemail@domain.com", "Automessage: ".$_POST['subject'], $_POST['message']);
?>


Message sent!


<?
}
else
{
?>


<form action="?" method="POST">
your email: <input type=text name=email><br>
subject: <input type=text name=subject><br>
message: <textarea name=message></textarea><br>
<input type=submit>
</form>


<?
}
?>


</html>

:)

John

mrredpants
04-16-2004, 05:47 AM
Might be a little over my head.

Where would should I place that script?

l0rdphi1
04-16-2004, 07:53 AM
That would go in a .php file somewhere on your site.

mrredpants
04-17-2004, 07:36 AM
From the advice of others, I plan on giving this script a try...for anyone interested:

http://scripts.dbmasters.net/index.php?n=42&id=39&sid=39