%
SUB sendmail( company, name, email, phone, website, comments )
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp.central.cox.net"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "vendorin.com"
.Item(cdoSendPassword) = "Pa$sw0rd"
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = email
'objCDO.From = "george@vasih.net"
objCDO.To = "georgevalentine@comcast.net"
objCDO.Subject = "Vendorin: Contact Us: Customer Service"
objcdo.textbody = "Below we have received the following request for:" & vbCrLf & _
"Vendorin: Contact Us: Customer Service:" & vbCrLf & vbCrLf & _
"Company: " & company & vbCrLf & _
"Name: " & name & vbCrLf & _
"E-Mail: " & email & vbCrLf & _
"Phone: " & phone & vbCrLf & _
"Website: " & website & vbCrLf & _
"Comments: " & comments & vbCrLf & _
objCDO.Send
END SUB
company = TRIM( Request.Form( "company") )
name = TRIM( Request.Form( "name") )
email = TRIM( Request.Form( "email") )
phone = TRIM( Request.Form( "phone") )
website = TRIM( Request.Form( "website" ) )
comments = TRIM( Request.Form( "comments") )
IF email <> "" THEN
sendMail company, name, email, phone, website, comments
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
' Any existing page can be used for the response redirect method
Response.redirect "/index.html"
END IF
%>
Vendorin: Contact Us: Customer Service