Reza Gholami

. : | P h o t o . G r a p h i s t | : .
Motif_Fereshteha

Contact

Please contact me directly at: info@rezagholami.com or use the form below.

MotifContact

<% 'Declaring Variables Dim smtpserver,youremail,yourpassword,ContactUs_Name,ContactUs_Email Dim ContactUs_Subject,ContactUs_Body,Action,IsError ' Grabbing variables from the form post ContactUs_Name = Request("ContactUs_Name") ContactUs_Email = Request("ContactUs_Email") ContactUs_Subject = "Contact" ContactUs_Body = Request("ContactUs_Body") Action = Request("Action") ' Used to check that the email entered is in a valid format Function IsValidEmail(Email) Dim ValidFlag,BadFlag,atCount,atLoop,SpecialFlag,UserName,DomainName,atChr,tAry1 ValidFlag = False If (Email <> "") And (InStr(1, Email, "@") > 0) And (InStr(1, Email, ".") > 0) Then atCount = 0 SpecialFlag = False For atLoop = 1 To Len(Email) atChr = Mid(Email, atLoop, 1) If atChr = "@" Then atCount = atCount + 1 If (atChr >= Chr(32)) And (atChr <= Chr(44)) Then SpecialFlag = True If (atChr = Chr(47)) Or (atChr = Chr(96)) Or (atChr >= Chr(123)) Then SpecialFlag = True If (atChr >= Chr(58)) And (atChr <= Chr(63)) Then SpecialFlag = True If (atChr >= Chr(91)) And (atChr <= Chr(94)) Then SpecialFlag = True Next If (atCount = 1) And (SpecialFlag = False) Then BadFlag = False tAry1 = Split(Email, "@") UserName = tAry1(0) DomainName = tAry1(1) If (UserName = "") Or (DomainName = "") Then BadFlag = True If Mid(DomainName, 1, 1) = "." then BadFlag = True If Mid(DomainName, Len(DomainName), 1) = "." then BadFlag = True ValidFlag = True End If End If If BadFlag = True Then ValidFlag = False IsValidEmail = ValidFlag End Function If Action = "SendEmail" Then ' Here we quickly check/validate the information entered ' These checks could easily be improved to look for more things If IsValidEmail(ContactUs_Email) = "False" Then IsError = "Yes" Response.Write("Please enter your email .
") End If If ContactUs_Name = "" Then IsError = "Yes" Response.Write("Please enter your name .
") End If If ContactUs_Body = "" Then IsError = "Yes" Response.Write("Please enter your message .
") End If End If ' If there were no input errors and the action of the form is "SendEMail" we send the email off If Action = "SendEmail" And IsError <> "Yes" Then Dim strBody ' Here we create a nice looking html body for the email strBody = strBody & "Contact Us Form submitted at " & Now() & vbCrLf & "

" strBody = strBody & "Name" & " : " & " " & Replace(ContactUs_Name,vbCr,"
") & "
" strBody = strBody & "Email" & " : " & " " & Replace(ContactUs_Email,vbCr,"
") & "
" strBody = strBody & "
" & Replace(ContactUs_Body,vbCr,"
") & "
" strBody = strBody & "
" 'This section provides the configuration information for the remote SMTP server. dim mailobj Set mailobj = Server.CreateObject("Persits.MailSender") With mailobj .Host = "mail.rezagholami.com" .Username = "mail@rezagholami.com" .Password = "mail2info" .IsHTML = true .From = ContactUs_Email .AddAddress "mail@rezagholami.com" .Subject = ContactUs_Subject .Body = strBody .send End With Set mailobj = Nothing %> Your message has been sent.
Thank you for contacting me, I will contact you as soon as possible.
<% Else %>

Motif_2Lozy
Name :

E-Mail :

 

Message :

 

<% End If %>
Motif_Page
Thanks for visiting!
Copyright © 2010 Reza Gholami All rights reserved.