I thought since I am building my site a 'Contact Me' page ... I may
has well include it in my sites scripts (I am doing this with quite a
few other tools of my site as well).
It isn't perfect yet, but it is good. Currently you have 2 options for
the way the message gets to you ... through Persits ASPEmail component
or just writing the messages (very cleanly) to a text file. ((Which by
the way, I am going to be also including a way to view and reply to
messages through a 'contact_admin. asp' backend tool)).
I like the textfile write myself because it is faster than calling a
component ... but have the email has it's obvious advantages too.
Anyway, I have this little thing running at ...
http://test.coolpier.com/
It is simply a table ... not a full webpage ... it is about
width="500" and height="400" ... so you will be able to drop the code
right into a table cell in your design.
By the way ... the code looks like this ... I have this one setup for
textfile message storage ... but I included the code (commented out)
for using Persits ASPEmail component.
It is really easy to control the subjects dropdown values as you can
see. I also included the CSS code ... so you have some control on
colors, font, text ... so you can make it match your site.
ALSO ... I have included my JSValidation.js for form validation ... it
currently checks that everything has a value ... and also that the
email address is mostly valid ((be patient with me ... I am going to
be improving MY email validation shortly))
On top of validation, There is a limiter on the # of messages that can
be sent daily.
***********
Anyway, I just would like to help out the group as much as I can ...
so use the tool and send me a message or 2 about what you may like to
see with it. If good responses ... here or through message tool ... I
will add code so people can use other popular email components.
***********
<style type="text/css">
table.cp_FormTa ble {border: 2px solid #339; background-color:
#ccf;}
.cp_FormFields, .cp_Confirmatio nMessages, .cp_FormTitle,
cp_FormFieldTit les {font-family: verdana; font-weight: bold;
font-size: 10pt;}
.cp_FormFields {border: 1px solid #000; font-weight:
normal;}
.cp_FormTitle {font-size: 12pt;}
.cp_FormFieldTi tles {}
.cp_Confirmatio nMessages {font-weight: normal;}
</style>
<%
Dim cp_ConactMe: Set cp_ConactMe = New cp_ContactMeCla ss
With cp_ConactMe
.cp_MessagesPer Day = 3
.cp_FormTitle = "Contact Me"
.cp_AddSubjectO ption("Website Comment")
.cp_AddSubjectO ption("Script Comment")
.cp_AddSubjectO ption("Thank you")
.cp_AddSubjectO ption("Would like custom script made.")
.cp_AddSubjectO ption("Other")
'// *** TEXT FILE MESSAGE ***
.cp_MessageType = "textfile"
.cp_TextPath = Server.MapPath( "/contact_message s.asp")
'// *** Persits ASPEmail Component MESSAGE ***
'.cp_MessageTyp e = "aspemail"
'.cp_YourSMTPHo st = "mail.yourdomai n.com"
'.cp_YourEmailA ddress = "bcc,yo**@email .com"
'.cp_WebsiteEma ilAddress = "we*****@yourdo main.com"
.cp_Start()
End With
Set cp_ConactMe = Nothing
%>
Brynn
www.coolpier.com
I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!