Hi,
Anyone knows how can I make cdo save a copy of the sent message to set items.
Thanks,
Albano
This the code I'm using:
Dim objCDO
Dim iConf
Dim Flds
SET rsDadosMail= NOTHING
strSQLMail="SELECT * FROM configEmail WHERE tipoMail=4" 'Email do tipo reporting diário
retorno = sqlSelect(objConn, strSQLMail, rsDadosMail, "exportExcel.asp - #4")
remetente=trim(rsDadosMail("remetenteMail"))
destinatario=trim(destino)
campoCc=""'trim(rsDadosMail("cc"))
campoBcc=""'trim(rsDadosMail("bcc"))
assunto=trim(rsDadosMail("assunto"))
mensagem=rsDadosMail("mensagem")
nomeFicheiro = "/exportacao/" & codTier & ".xls"
nFicheiro = Server.MapPath(nomeFicheiro)
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
'Set objSentItems = objSess.GetDefaultFolder(3)
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) ="GEAC01XBAL5"
.Item(cdoSMTPAccountName) = "pedro.rodrigues@gefco.pt"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = remetente
objCDO.To = destinatario
objCDO.cc = campoCc
objCDO.bcc = campoBcc
objCDO.Subject = assunto
objCDO.TextBody = mensagem
objCDO.AddAttachment nFicheiro
objCDO.Send
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
Anyone knows how can I make cdo save a copy of the sent message to set items.
Thanks,
Albano
This the code I'm using:
Dim objCDO
Dim iConf
Dim Flds
SET rsDadosMail= NOTHING
strSQLMail="SELECT * FROM configEmail WHERE tipoMail=4" 'Email do tipo reporting diário
retorno = sqlSelect(objConn, strSQLMail, rsDadosMail, "exportExcel.asp - #4")
remetente=trim(rsDadosMail("remetenteMail"))
destinatario=trim(destino)
campoCc=""'trim(rsDadosMail("cc"))
campoBcc=""'trim(rsDadosMail("bcc"))
assunto=trim(rsDadosMail("assunto"))
mensagem=rsDadosMail("mensagem")
nomeFicheiro = "/exportacao/" & codTier & ".xls"
nFicheiro = Server.MapPath(nomeFicheiro)
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
'Set objSentItems = objSess.GetDefaultFolder(3)
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) ="GEAC01XBAL5"
.Item(cdoSMTPAccountName) = "pedro.rodrigues@gefco.pt"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = remetente
objCDO.To = destinatario
objCDO.cc = campoCc
objCDO.bcc = campoBcc
objCDO.Subject = assunto
objCDO.TextBody = mensagem
objCDO.AddAttachment nFicheiro
objCDO.Send
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing