<%@ Language = "VBScript" %> <% Select Case Request.Querystring("Action") Case "Send" on error resume next 'Set variables Dim BackURL Dim strName Dim strEmail Dim strSubject Dim strMessage Dim strUserIP Dim strToEmail Dim daCdoMail 'Replace this email with your real email id strToEmail = "mail@kingvinnie.com" BackURL = Request.ServerVariables("HTTP_REFERER") strName = Request.form("Name") strEmail = Request.form("Email") strSubject = Request.form("Subject") strMessage = Request.form("Message") strUserIP = Request.ServerVariables("REMOTE_ADDR") 'Create Mail Object Set daCdoMail = Server.CreateObject("CDO.Message") daCdoMail.To = strToEmail daCdoMail.From = strEmail daCdoMail.Subject = "KingVinnie.com Mail: " & strSubject daCdoMail.HTMLBody = "This message was sent by " & strName & " at " & Now() & ".

" & strMessage daCdoMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server daCdoMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ ="mail.kingvinnie.com" 'Server port daCdoMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ =25 daCdoMail.Configuration.Fields.Update 'Set Server Side Validation to make sure we got both sender and recipient email Id to send email If strToEmail = "" OR strEmail = "" Then Session("msg") = "Sender Email or Resipient Email is blank. This message can not be sent. Please try again" Response.redirect (BackURL) Else 'Now send email to the address you specified at line no. 16 daCdoMail.Send End If 'Destroy mail object Set daCdoMail = Nothing 'Create result text in a Sesion Session("MsgSent") = "Your email with subject [ " & strSubject & " ] has been sent. Thank you." 'Redirect and show the result Response.redirect (BackURL) End Select %> KingVinnie's Web Page - Contact Information

 

 

<%If Session("msgSent") = "" Then%> <%If Session("msg") <> "" Then%> <%End If%>

Contact Form

If you want to contact me, then please fill the form correctly and send it to me by hitting the 'Send Message' button.
<%=Session("msg")%> 
 
Your Name: ">
Your Email: ">
Subject: ">
Your Message:
 
 
<%Else%>

Message Sent

<%=Session("MsgSent")%> 
<%End If 'Destroy session variables Session("MsgSent") = "" Session("msg") = "" %>

 
©1995-2006 Vince Mar'te Formosa
All Right Reserved