Jump to content
wallyb

Autoresponder Reply To Front Page Form

Recommended Posts

You can go into your Control Panel, and choose Mail, and then there is an option where you can create an autoresponder to a domain email address. Much easier to do it this way than through a web form.

Share this post


Link to post
Share on other sites
You can go into your Control Panel, and choose Mail, and then there is an option where you can create an autoresponder to a domain email address. Much easier to do it this way than through a web form.

 

 

thanks for that but I'm not sure I understand how that method would reply to the email address of the person who is submitting the form.

Share this post


Link to post
Share on other sites

When you create an auto responder in your control panel setup, any email coming to it is responded to.... so, if your form results are sent via email to that address, with the person submitting the form as the from address, the autoresponder will respond to the from address. You can use any type of CGI for the form results, or also use PHP (which is what I do). As a matter of fact, I also use PHP to send a form result to the person submitting the form. Be happy to give you the code via posting here on this forum if you're not sure how to do all that.

Share this post


Link to post
Share on other sites
When you create an auto responder in your control panel setup, any email coming to it is responded to.... so, if your form results are sent via email to that address, with the person submitting the form as the from address, the autoresponder will respond to the from address. You can use any type of CGI for the form results, or also use PHP (which is what I do). As a matter of fact, I also use PHP to send a form result to the person submitting the form. Be happy to give you the code via posting here on this forum if you're not sure how to do all that.

 

 

OK but I was under the impression that the website is forwarding the form so that the autoresponder would be replying to the website submission address and it would not automatically find the email of the client which is included in the form. I think somehow I have to find a way to segregate that email address in the form and be able to reply to it (by the way the form gets imported into our client software registration so I don't want to fool with changing it).

Share this post


Link to post
Share on other sites

Here is the code that I use, it involves two pages, one that they send the message to you from, and one that is called by the form action. I'm sure this can be tweaked in a variety of ways as the code I am providing is simple-and-sweet.

 

This is the code for the web page that has the form, name it something like "contactme.htm". The action="thankyou.php" is the web page called by the form when submitted.

 

<form method="POST" action="thankyou.php">

<input type="text" name="FirstName" size="55"></td>

<input type="text" name="LastName" size="55"></td>

<input type="text" name="Email" size="55"></td>

<input type="submit" value="Submit" name="B1"> 

<input type="reset" value="Reset" name="B2">

</form>

 

This is the code for the thankyou.php web page... note: the extension of the page must have the .php extension for this to work. I place the following at the top of the page before the <html> tag. It just checks to make sure they have given you some kind of information, and that the email address they gave is a functional email address.

 

<?php

$missinginfo = "no";

 

$FirstName = $_POST['FirstName'];

if ($FirstName == "")

{$missinginfo = "Yes";}

 

$LastName = $_POST['LastName'];

if ($LastName == "")

{$missinginfo = "Yes";}

 

$Email = $_POST['Email'];

if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email))

{}

else {$missinginfo = "Yes";}

 

?>

Then, somewhere in the body of the web page, place this to actually send the message.....

 

<?php

if ($missinginfo == "Yes")

{

print "<font face=\"Verdana\" color=\"#800000\" size=\"2\">";

print "<b>Required information is missing from your submission.</b><br>Please use your back button to change the information you have provided and to resubmit it.<br><br>";

print "<font color=\"#000000\">";

print "Organization: $Organization<br>";

print "Name: $FirstName $LastName<br>";

print "Address: $Address1<br>";

print "Address: $Address2<br>";

print "City: $City<br>";

print "State: $State<br>";

print "Postal Code: $PostalCode<br>";

print "Country: $FromCountry<br>";

print "Telephone: $Telephone<br>";

print "Email: $Email<br><br>";

print "Ministry Area: $ForDepartment<br><br>";

print "Your Message: $Message<br>";

print "</font>";

}

else

{

// SEND EMAIL TO ME

$subject = "Contact From www.somesite.com";

$emessage = "<font face=\"Verdana\" size=\"2\">";

$emessage .= "<b>Email Contact From xyz Web Site</b><br><br>";

 

$emessage .= "<b>Name</b>: $LastName, $FirstName<br>";

$emessage .= "<b>Email</b>: $Email<br>";

 

$emessage .= "</font>";

$headers = "From: $Email\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($to, $subject, $emessage, $headers);

 

print "<font face=\"Verdana\" size=\"2\">";

print "<b>Thank you</b> for contacting us! Your message has been emailed!<br><br>";

 

// SEND AUTOMATIC REPLY EMAIL TO PERSON WHO SENT THE MESSAGE

$replymessage = "Thank you for sending me an email from my web site.";

$subject = "Thank you for contacting Missionary TECH Team";

$to = $Email;

$from = "YOUREMAIL.COM";

$emessage = "<font face=\"Verdana\" size=\"2\">";

$emessage .= $replymessage;

$emessage .= "</font>";

$headers = "From: $from\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($to, $subject, $emessage, $headers);

}

?>

Edited by jnull

Share this post


Link to post
Share on other sites
Here is the code that I use, it involves two pages, one that they send the message to you from, and one that is called by the form action. I'm sure this can be tweaked in a variety of ways as the code I am providing is simple-and-sweet.

 

This is the code for the web page that has the form, name it something like "contactme.htm". The action="thankyou.php" is the web page called by the form when submitted.

 

<form method="POST" action="thankyou.php">

<input type="text" name="FirstName" size="55"></td>

<input type="text" name="LastName" size="55"></td>

<input type="text" name="Email" size="55"></td>

<input type="submit" value="Submit" name="B1"> 

<input type="reset" value="Reset" name="B2">

</form>

 

This is the code for the thankyou.php web page... note: the extension of the page must have the .php extension for this to work. I place the following at the top of the page before the <html> tag. It just checks to make sure they have given you some kind of information, and that the email address they gave is a functional email address.

 

<?php

$missinginfo = "no";

 

$FirstName = $_POST['FirstName'];

if ($FirstName == "")

{$missinginfo = "Yes";}

 

$LastName = $_POST['LastName'];

if ($LastName == "")

{$missinginfo = "Yes";}

 

$Email = $_POST['Email'];

if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email))

{}

else {$missinginfo = "Yes";}

 

?>

Then, somewhere in the body of the web page, place this to actually send the message.....

 

<?php

if ($missinginfo == "Yes")

{

print "<font face=\"Verdana\" color=\"#800000\" size=\"2\">";

print "<b>Required information is missing from your submission.</b><br>Please use your back button to change the information you have provided and to resubmit it.<br><br>";

print "<font color=\"#000000\">";

print "Organization: $Organization<br>";

print "Name: $FirstName $LastName<br>";

print "Address: $Address1<br>";

print "Address: $Address2<br>";

print "City: $City<br>";

print "State: $State<br>";

print "Postal Code: $PostalCode<br>";

print "Country: $FromCountry<br>";

print "Telephone: $Telephone<br>";

print "Email: $Email<br><br>";

print "Ministry Area: $ForDepartment<br><br>";

print "Your Message: $Message<br>";

print "</font>";

}

else

{

// SEND EMAIL TO ME

$subject = "Contact From www.somesite.com";

$emessage = "<font face=\"Verdana\" size=\"2\">";

$emessage .= "<b>Email Contact From xyz Web Site</b><br><br>";

 

$emessage .= "<b>Name</b>: $LastName, $FirstName<br>";

$emessage .= "<b>Email</b>: $Email<br>";

 

$emessage .= "</font>";

$headers = "From: $Email\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($to, $subject, $emessage, $headers);

 

print "<font face=\"Verdana\" size=\"2\">";

print "<b>Thank you</b> for contacting us! Your message has been emailed!<br><br>";

 

// SEND AUTOMATIC REPLY EMAIL TO PERSON WHO SENT THE MESSAGE

$replymessage = "Thank you for sending me an email from my web site.";

$subject = "Thank you for contacting Missionary TECH Team";

$to = $Email;

$from = "YOUREMAIL.COM";

$emessage = "<font face=\"Verdana\" size=\"2\">";

$emessage .= $replymessage;

$emessage .= "</font>";

$headers = "From: $from\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail($to, $subject, $emessage, $headers);

}

?>

 

 

Hi,

 

Thanks for helping me out here but I think I found an easier solution. Your solution would not have worked because in the place of the confirmation page I have a demo software.exe file so that the moment a client submits the form the software begins to download.

 

I found that all I had to do in Front Page was this:

In the Forms Properties box click on Options and then Email Results

In the Reply-to: line click on Form Field Name and under that I typed in the name of the form field on the form that contains the email address of the client.

The form is emailed to my server as coming from the email address entered by the client and the autoresoponder sends them the message.

 

Thanks again for your help

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...