<%
If request.form ("f") = "Submit" Then
Dim myMail
Dim strBody 'Message email
Dim strMyEmailAddress 'Alamat email tujuan
Dim strEmailSender 'Alamat email pengirim
Dim sch
reqNama = Trim(Request.Form("nama"))
reqEmail = Trim(Request.Form("email"))
reqAlamat = Trim(Request.Form("alamat"))
reqPesan = Trim(Request.Form("pesan"))
If reqNama = "" Then
Response.write "Name field is required!" & "
"
End if
If reqEmail = "" Then
Response.write "Email field is required!" & "
"
End if
If reqAlamat = "" Then
Response.write "Address field is required!" & "
"
End if
If reqPesan = "" Then
Response.write "Comment field is required!"
End if
If reqNama <> "" and reqEmail <> "" and reqAlamat <> "" and reqPesan <> "" Then
body = "Feedback APMI website !" & vbcrlf & vbcrlf
body = body & "Nama : " & reqNama & vbcrlf
body = body & "Email : " & reqEmail & vbcrlf
body = body & "Alamat : " & reqAlamat & vbcrlf
body = body & "Pesan : " & reqPesan & vbcrlf
body = body & "-------------------------------------------------------------------------------"
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 1
.Item(sch & "smtpserver") = "mail.indonesiantoys.com"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = reqEmail
.To = "info@indonesiantoys.com"
.Subject = "Feedback from website"
.HTMLBody = body
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.Write "Your comment has been sent." & "
"
response.write "Thank you for coming."
End if
End if
%>