<%
Dim pismo,posta,subj
function proverimail(x)
Dim DNSMX,A
Set DNSMX = CreateObject("ASPMX.Resolver")
DNSMX.TimeOutValue = 30
A = DNSMX.ValidateEMail(x)
If Len(A) = 0 Then
proverimail = 1
Else
proverimail = 0
End If
Set DNSMX = Nothing
end function
if Request.Form("action") = "sendmail" then
'dokogo = "info@eurostandard.com.mk"
dokogo = "valea@unet.com.mk"
ime = request.form("realname")
if ime = "" then
erroname = "Enter name"
sostojba = "The message could not be sent!"
else
erroname = ""
end if
pismo = request.form("tekst")
if pismo="" then
erropis = "Enter text"
sostojba = "The message could not be sent!"
else
erropis = ""
end if
subj = request.form("predmet")
if subj = "" then
errosubj = "Enter suject"
sostojba = "The message could not be sent!"
else
errosubj = ""
end if
posta = request.form("mail")
if proverimail(posta) = 0 then
erromail = "Enter valid e-mail"
sostojba = "The message could not be sent!"
else
erromail = ""
end if
tel = request.form("phone")
addr = request.form("address")
if ( (erromail="") and (errosub="") and (erropis="") and (erroto="") and (erroname="") ) then
Set SMTP = Server.CreateObject("EasyMail.SMTP.6")
SMTP.LicenseKey = "Louise Priest (Single Developer)/0010630410721500AB30"
SMTP.MailServer = "mail.unet.com.mk"
SMTP.Subject= subj
SMTP.Bodyformat = 1
SMTP.BodyText = "Name: " + ime + " " + "Phone: " + tel + " " + "Address: " + addr + " " + "Message: " + pismo + ""
'SMTP.BodyText = "???: " + ime + " " + "???????: " + tel + " " + "??????: " + addr + " " + "?????: " + firma + " " + "??????: " + pismo
SMTP.From = ime
SMTP.FromAddr = posta
SMTP.AddRecipient "unet", dokogo, 1
x = SMTP.Send()
if x=0 then
Response.Write("The message was sent!")
else
Response.Write("The message could not be sent!")
end if
end if
end if
%> |