% ' send by connecting to port 26 of the Microsoft SMTP server Dim iMsg Dim iConf Dim Flds Dim strHTML Dim strSmartHost '*****************DO NOT CHANGE**************** Const cdoSendUsingPort = 26 StrSmartHost = "localhost" public function sendemail(email_to, email_from, email_subject, email_body) 'on error resume next Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 End With '*********************************************** ' apply the settings to the message With iMsg Set .Configuration = iConf .To = email_to .From = email_from .Subject = email_subject .HTMLBody = email_body .Send End With ' objMail.From = email_from ' objMail.Subject = email_subject ' objMail.To = email_to ' objMail.Body = email_body ' objMail.Send ' if Err.number > 0 then ' sendemail = false ' else ' sendemail = true ' end if ' 'You must always do this with CDONTS. ' set objMail = nothing end function %> <% if request.form("submit1") <> "" then strMsgHeader = "Form Information Follows: " & vbCrLf & vbCrLf for i = 1 to Request.Form.Count strMsgInfo = strMsgInfo & Request.Form.Key(i) & " - " & Request.Form.Item(i) & vbCrLf next strMsgFooter = vbCrLf & "End of form information" '@@@@@@@@@@@@@@@ Change lines below in quotes @@@@@@@@@@@@@@@ sEmailto = "pmgsales@caremanagerpro.com" 'sEmailto = "tekcomp@hotmail.com" sEmailFrom = "admin@caremanagerpro.com" sSubject = "CareManagerPro Information Request" bdata = sendemail(sEmailto,sEmailFrom,sSubject,strMsgHeader & strMsgInfo & strMsgFooter) '@@@@@@@@@@@@@@@ End editing @@@@@@@@@@@@@@@ end if %>
![]()