%
if (isNull(request.cookies("ckyUserID"))) or (request.cookies("ckyUserID")="") then
response.redirect "index.asp"
end if
%>
<%
UID = clng(getUserID(request.cookies("ckyUserID")))
if len(request.querystring) > 0 then
QID = request.querystring("QID")
arrIDM = request.querystring("arrIDM")
else
QID = request.form("QID")
arrIDM = request.form("arrIDM")
end if
SUB sendmail( fromWho, toWho, CC, BCC, Subject, Body, attach, UID )
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Const cdoSendUsingPickup = 1
on error resume next
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
BCC = BCC & ";gareth@overdrive.co.za"'BCC FOR GARETH!!!!!!!!!!!!!!!!!!!!TESTING JUNK EMAIL 20.10.2009
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mx-internal.fd.com"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = fromWho
objCDO.To = toWho
if len(trim(CC)) > 0 then
objCDO.CC = CC
end if
if len(trim(BCC)) > 0 then
objCDO.BCC = BCC
end if
objCDO.Subject = Subject
objCDO.HtmlBody = Body
'objCDO.TextBody = Body
'if attach <> 0 then
' attach = split(left(attach, len(attach) -1), ";")
'for j = 0 to ubound(attach)
' objCDO.AddAttachment "C:\Inetpub\wwwroot\contacts\tmp_upload\" & UID & "_" & attach(j),,attach(j)
'next
' end if
objCDO.Send
' response.write "
" & objCDO.From
' response.write "
" & objCDO.To
' response.write "
" & objCDO.CC
' response.write "
" & objCDO.BCC
' response.write "
" & objCDO.Subject
' response.write "
" & objCDO.HtmlBody
if err.number <> 0 then
response.write "
" & err.description
end if
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
END SUB
if request.form("btnSend") = "Send" then
if request.form("attach") <> "" then
attach = request.form("attach")
else
attach = 0
end if
s = "Select strDisclaimer From tblSystem"
set rst = cn.execute(s)
if not rst.eof then
myDisclaimer = rst("strDisclaimer")
else
myDisclaimer = ""
end if
rst.close
user = getUserName(UID)
' strList = request.form("strList")
strSubject = request.form("strSubject")
strMessage = request.form("FCKeditor1") & "