Link to home
Start Free TrialLog in
Avatar of mcse63
mcse63

asked on

Problems getting a form to send email?

Other customers can send mail from there webpages. This is a windows2000server/iis5/fpse2000/Imail6

This form is being created on a Disk-Based Web or the FrontPage Server Extenstions have not been configured to send e-mail. Please direct your system administrator or Internet Service Provider to the instructions in "Setting up E-mail Options on Windows" or Email options on UNIX" in the Server Extentions Resourse Kit. If you do not have the Server extentions Resource Kit, you can find it at http://www.microsoft.com/frontpage/wpp/serk

Any Ideas?
Avatar of humeniuk
humeniuk
Flag of Canada image

I've only done it with PHP scripting, would that be helpful?  I'm sure you can do it with ASP as well.
Avatar of mcse63
mcse63

ASKER

They have created a form in frontpage and are trying to get a submit to send to an email address.
You can create the form with any web dev software (FrontPage, DreamWeaver - which I prefer) or even a text editor).  The data collected by the form has to be processed and emailed however.   I have done this with PHP, but to use a PHP script, you need PHP installed on your server.  There are also ASP and Perl solutions, but I don't have much experience with those.  There is also an SMTP service as part of Win2k/IIS and while I suspect that could be configured to integrate with a local website,  again I don't have any experience with that, so I can't help you if that's the route you choose to go.

If you can tell us which route is best for you  (ie. if you already have PHP installed, the solution becomes very simple), it will be easier to help out.
Avatar of mcse63

ASKER

PHP is now installed and ready to go. I am ready for simple as this persons website has been experiencing this since it was moved from one server to another.
Here is a simple PHP Fom to Mail script (source - http://www.coder2000.ca/page/download, please keep the copyright info intact).  Just create a form with fields using the variables in the script (ie. 'from' 'subject') and set the form action as 'sendmail.php' or whatever you call this script.


<?php

/**
 * FormMail Script
 *
 * @version $Id$
 * @copyright 2004 Dieter Lunn All Rights Reserved
 **/

// Setup Variables
$to = "nobody@nobody.com";            // The address you want the email to go to

// DO NOT CHANGE BELOW THIS LINE
$from = $_POST['from'];      // The address the email is coming from
$subject = $_POST['subject'];      // The subject of the email
$message = $_POST['message'];  // The actual message
$name = $_POST['name'];      // Name of the person sending the email
$redirect = $_POST['redirect'];      // Page to redirect to after mail is sent

$headers = "From: $name <$from>";

mail($to, $subject, $message, $headers);

header("Location:$redirect");
?>
Avatar of mcse63

ASKER

where would this go, here is the code that is attached to the submit button right now.

<p><a href="mailto:challenge1@mail.com?subject=Form Submit"><input type="submit" value="Submit" name="B3"></a>Push
  button to send form</p>
</form>
<p>&nbsp;</p>
ASKER CERTIFIED SOLUTION
Avatar of humeniuk
humeniuk
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial