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; -
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
-
Any advice as to how to connect to the server for CDO messages would be appreciated
8 6657
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.
This is an outlook setting and can be turned off in outlook. This would probably not be allowed by your company for security reasons though.
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; -
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
-
Any advice as to how to connect to the server for CDO messages would be appreciated
I don't use CDO so I will leave this for someone else to answer.
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;
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
Any advice as to how to connect to the server for CDO messages would be appreciated
here is the code I use to send mail using CDO -
Public Function SendEmailCDO(ByVal strTo As String, _
-
ByVal strMessage As String, _
-
ByVal strSubject As String, _
-
Optional ByVal strAttach As String)
-
Dim objEmail As Object
-
On Error Resume Next
-
Set objEmail = CreateObject("CDO.Message")
-
'**** email address of sender
-
objEmail.FROM = "fred@smith.com"
-
objEmail.To = strTo
-
objEmail.Subject = strSubject
-
objEmail.TextBody = strMessage
-
If strAttach <> "" Then objEmail.AddAttachment strAttach
-
objEmail.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/sendusing")=2
-
'*** smtp.xxx.com - here u enter your smtp server name, whatever that is
-
objEmail.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.xx.com"
-
objEmail.Configuration.Fields.Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
-
objEmail.Configuration.Fields.Update
-
objEmail.Send
-
If err.Number <> 0 Then
-
MsgBox "Error in sending. " & err.Description
-
Else
-
MsgBox "Sent" 'remove this if u dont want confirmation
-
End If
-
Set objEmail = Nothing
-
-
End Function
-
let me know if you need any followup.
J
J can CDO be used to open a .oft?
J can CDO be used to open a .oft?
.oft?
not sure what that is.
.oft?
not sure what that is.
.oft is an Outlook file template. Not sure if you can combine a CDO message and open a template file at the same time? I'm looking at doing this but not sure if I'm going about it the right way.
Edit: typos and sentence restructure
.oft is an Outlook file template. Not sure if you can combine a CDO message and open a template file at the same time? I'm looking at doing this but not sure if I'm going about it the right way.
Edit: typos and sentence restructure
Gawd! I apologise sincerely for this "stupid" and "ignorant" question!! Have since done some other reading and now realise that this is wayyyyyy off the planet.
Jodi
[quote=mmccarthy]This is an outlook setting and can be turned off in outlook. This would probably not be allowed by your company for security reasons though.
I am attempting this same process, and have the access rights to turn this setting off if I knew where to find it :). Can you tell me how to turn the prompt off in Outlook? Thanks!!!
This is an outlook setting and can be turned off in outlook. This would probably not be allowed by your company for security reasons though.
I am attempting this same process, and have the access rights to turn this setting off if I knew where to find it :). Can you tell me how to turn the prompt off in Outlook? Thanks!!!
In Outlook 2000 or earlier go to options and under the security tab click on Attachment Security. Be careful though as this disables all attachment security.
In Outlook 2003 or later you will need to use automation VBA code as follows -
-
OlSecurityManager.ConnectTo OutlookApp
-
OlSecurityManager.DisableOOMWarnings = True
-
On Error Goto Finally
-
-
'... send your mails here ...
-
-
Finally: OlSecurityManager.DisableOOMWarnings = False
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Job Lot |
last post by:
I how can create vb.net app that checks for emails sent to an address and
extract the .xls file attached to the email to a specified location.
Also, how can download and upload from a FTP address...
|
by: yoda |
last post by:
Hi Guys,
I've been used to deploying code to the production server by checking
out of subversion and manually sorting out any kinks. (yes, I know, it
sounds primitive)
I realize I'm losing so...
|
by: xzzy |
last post by:
I need to automate a report in a different database (and thank yous to Terry
Kreft for pointing me in the right direction).
below is the code with the one line that does not work, marked: 'Does...
|
by: Lauren Wilson |
last post by:
Hi folks,
We have an Access 2000 app that is highly integrated with Outlook 2000
or later. The app allows the user to send predefined emails that are
created through an Access form and stored...
|
by: DN |
last post by:
I'm receiving automated emails from a web page with a form to e-mail cgi.
How can I automate Access to automatically import the contents of the
information into my database? Each e-mail has only...
|
by: rcoutts |
last post by:
I have a custom Access database that is a bulk mailing program for my
small business to send emails to my customers (not spam!). Before
sending mail, I export a folder in Outlook to an Access MDB...
|
by: Jimbo |
last post by:
Hello
I am currently designing an internal ordering system for IT equipment.
I am designing it in ASP.NET (vb) using Visual Studio 2003 and using
Microsoft SQL Server
I have got the system...
|
by: odysseyphotography |
last post by:
A friend would like to have a signup form on his site. Anyone that
signs up will be entered into a database and automatically sent an
email report. This much I can do!
However, he'd then like...
|
by: =?Utf-8?B?Q2hhcmxlcw==?= |
last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all
my emails stored on the Yahoo! server. However sometimes I can’t get access
to a PC/the web and I download my emails...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |