I have several forms built on a web site and need someone to make the back end mail form work correctly with my client's web host. I don't have much information but I do have a sample form that works on this Web host. It's a WIN NT server so must use ASP. Should be pretty simple for those who know what they are doing in ASP. I don't. Total of 5 forms, with as many as 10 fields in each form.
Sample form below:
<%
SUB sendmail( fromWho, toWho, Subject, Body )
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set objCDO = [login to view URL]("CDO.Message")
Set iConf = [login to view URL]("CDO.Configuration")
Set Flds = [login to view URL]
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail-fwd"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set [login to view URL] = iConf
[login to view URL] = fromWho
[login to view URL] = toWho
[login to view URL] = Subject
[login to view URL] = Body
[login to view URL]
END SUB
fromWho = TRIM( [login to view URL]( "fromWho") )
toWho = TRIM( [login to view URL]( "toWho") )
Subject = TRIM( [login to view URL]( "Subject" ) )
Body = TRIM( [login to view URL]( "Body") )
If toWho "" THEN
sendMail fromWho, toWho, Subject, Body
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
[login to view URL] "confirmation.html"
' Any existing page can be used for the response redirect method
END IF
%>
Email Form
<FORM METHOD="POST" ACTION="">
TO:
FROM:
SUBJECT: