Hi,
I am using Access in Office 2003 to try to automate messaging people in my organisation after a certain period has passed. I have managed to do this fine with what little knowledge I have, apart from the fact using Outlook creates a security confirmation message, which ruins the whole automation process. I cannot really bypass this.
I read that using a CDO message would not create this security alert. However, I am not sure exactly how to connect to my server, or whether it would allow me to do this, I have tried to talk to IS, and they haven't got back to me.
I've got various code examples from the internet and when I run them it asks about connection to the server, as below;
Any advice as to how to connect to the server for CDO messages would be appreciated
I am using Access in Office 2003 to try to automate messaging people in my organisation after a certain period has passed. I have managed to do this fine with what little knowledge I have, apart from the fact using Outlook creates a security confirmation message, which ruins the whole automation process. I cannot really bypass this.
I read that using a CDO message would not create this security alert. However, I am not sure exactly how to connect to my server, or whether it would allow me to do this, I have tried to talk to IS, and they haven't got back to me.
I've got various code examples from the internet and when I run them it asks about connection to the server, as below;
Code:
Public Function CDOMail_Click()
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "<server name>" 'My server name from Outlook is D1EXC004
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "peter.martin@rpa.gsi.gov.uk"
.To = "peter.martin@rpa.gsi.gov.uk"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Function
Comment