RE: [NTISP] Web form

Ronnie Franklin ( (no email) )
Sat, 6 May 2000 16:36:58 -0500

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01BFB779.4C317A20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Attached is a .asp that you can use. This is a modified version of one that
was published by ZD in Active Server Vol 2 No 5 May 1998. It does use the
Microsoft Sendmail component that came with Microsoft's Personalization
System.. Back then I downloaded a trial, and only installed that component..
it has worked every since then!!

Ronnie

> -----Original Message-----
> From: ntisp-request@iea-software.com
> [mailto:ntisp-request@iea-software.com]On Behalf Of Dave P.
> Sent: Saturday, May 06, 2000 4:18 PM
> To: ntisp
> Subject: [NTISP] Web form
>
>
> I would like to be able to have visitors to my web site submit a form
> from my webserver and email me the information.
> I am running 1 box as my dns server with iis 4.0 and another box for my
> mail server (using PostOffice 3.0) I tried using a script provided by
> the following site http://www.elementkjournals.com/asp/9905/asp9951.htm
> , with no luck. the email would not go thru. Any suggestions on how I
> might go about doing this.
>
> Dave
> . Dave Palazola
> The Gloucester Internet Connection ( TGIC )
> 186 Main Street
> Gloucester, MA. 01930
> phone: (978) 282-5150
>
>
>
> For more information about this list (including removal) go to:
> http://www.iea-software.com/support/maillists/liststart
>

------=_NextPart_000_0012_01BFB779.4C317A20
Content-Type: text/asp;
name="GenericEmail.asp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="GenericEmail.asp"

<%@ LANGUAGE=3D"VBSCRIPT" %>

Generic Email Page

Send Email to:=20
<% set sm=3DServer.CreateObject ("mps.sendmail") %><% If IsObject(sm) =3D FALSE then %>

An error has occured with the server. Please try later.

<% else %><% email=3DRequest("email") %><% REM If no data has been posted to this page, collect the data. %><% if Request("Content_Length")=3D0 then %>
Select the Department or Person that you would like to send this =message to:

General Information
Webmaster
Accounting
Sales
Technical =Support

Please enter your message:

Please enter your complete e-mail address:

Would you like a confirmation message
via email?YesNo

<% End If %><% If Request("Content_Length") <> 0 then %><% IF Request("comment") =3D "" then %>Your have not provided a message<% invaliddata =3D "yes" %><% end if %><% If Request("email") =3D "" then %>An Email address was not entered. Please re-type the information and =the Email address.=20<% invaliddata=3D"yes" %><% elseif (InStr(1, email, "@", 1) =3D 0) then %>
Your Email name must include an @ to be valid.<% invaliddata=3D"yes" %><% end if %><% end if %><% REM IF invalid data posted to form, display form to collect corrected =info. %><% If Request("Content_Length") <> 0 and invaliddata =3D "yes" then %>
Please provide the information , and try again.<% REM This form reads in any information that was already provided. %>

" method=3D"post" id=3Dform2 =name=3Dform2>Select the Department or Person that you would like to send this =message to:

General Information
Webmaster
Accounting
Sales
Technical =Support

Please enter your message:

Please enter your complete e-mail address:

Would you like a confirmation message
via email?YesNo

<% end if %><% If Request("address") =3D "Info" then sendaddress =3D "info@" %><% If Request("address") =3D "Webmaster" then sendaddress =3D ="Webmaster@" %><% If Request("address") =3D "Accounting" then sendaddress =3D ="Accounting@" %><% If Request("address") =3D "Sales" then sendaddress =3D "Sales@" %><% If Request("address") =3D "Support" then sendaddress =3D "Support@" =%><% subject =3D "Email from Webpage" %><% If invaliddata=3D"" and Request("Content_Length") <> 0 then %><% message =3D sm.sendmail (email, sendaddress, subject, _("Message from: " & Request("email") & chr(9) & =Request.ServerVariables("REMOTE_ADDR") _& chr(13) & chr(13) & Request("comment"))) %><% If Request("receipt") =3D "yes" then %><% Confirm =3D sm.sendmail (sendaddress, email, "Thank you", ("Your =Email has been sent to " & sendaddress & chr(13) & _chr(13) & "We received the following message from you. "& chr(13) & =chr(13) & _Request("comment")) & chr(13) & chr(13) & "We will reply in a timely =manner.") %><% end if %><% If message =3D TRUE then %>Thank you for sending us your message.
<% if confirm <> 0 then %>

A message has been sent to you at <% =3D Request("email") %> =
confirming that your message has been=20emailed to <% =3D sendaddress %>.

<% end if %><% else %><% =3D err.description %> An error has occured while attempting to send =your message.
Please send the Webmaster a message reporting =this error.<% end if %><% end if %><% end if %>

------=_NextPart_000_0012_01BFB779.4C317A20--