473,322 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Outlook "Security" causing a headache

Hi folks,

I have an a2k ap which is called from a batch file via task scheduler
on at night - it runs a bunch of updates, imports stuff from other
databases and generally preps the main backend for another day's work.
It logs everything and generates an email which it sends to a few
people, issuing warnings if there were problems. Have you guessed the
problem yet?

Outlook 2003 / SP2 - "...Trying to send a mail...", "...use address
book..." messages. Usually I'd install outlook redemption, or a
different email client or something but since it's a banking
environment there are strict rules about software:

Can't reduce security in exchange
Can't install 3rd party patches to licenced software
etc, etc...

I need a solution!!!
- is there a way to bypass the email client and directly send an email
from the exchange server without bringing a tonne of warining messages
down on my head?
- failing that, are there any other solutions other people here have
used?

Apr 20 '06 #1
14 4454
BillCo wrote:
Hi folks,

I have an a2k ap which is called from a batch file via task scheduler
on at night - it runs a bunch of updates, imports stuff from other
databases and generally preps the main backend for another day's work.
It logs everything and generates an email which it sends to a few
people, issuing warnings if there were problems. Have you guessed the
problem yet?

Outlook 2003 / SP2 - "...Trying to send a mail...", "...use address
book..." messages. Usually I'd install outlook redemption, or a
different email client or something but since it's a banking
environment there are strict rules about software:

Can't reduce security in exchange
Can't install 3rd party patches to licenced software
etc, etc...

I need a solution!!!
- is there a way to bypass the email client and directly send an email
from the exchange server without bringing a tonne of warining messages
down on my head?
- failing that, are there any other solutions other people here have
used?


If the OS is Windows 2K or XP then it already has CDOSys messaging library
installed and you can automate that instead of Outlook. If you Google on "CDO"
you should easily find code examples.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 20 '06 #2
I once tried CDO and noticed that one needs an open InternetConnection to use it.
So you would need to check for a connection first or only use CDO with a broadband (always open) connection.
Right/wrong?

Arno R

"Rick Brandt" <ri*********@hotmail.com> schreef in bericht news:t8*****************@newssvr12.news.prodigy.co m...
BillCo wrote:
Hi folks,

I have an a2k ap which is called from a batch file via task scheduler
on at night - it runs a bunch of updates, imports stuff from other
databases and generally preps the main backend for another day's work.
It logs everything and generates an email which it sends to a few
people, issuing warnings if there were problems. Have you guessed the
problem yet?

Outlook 2003 / SP2 - "...Trying to send a mail...", "...use address
book..." messages. Usually I'd install outlook redemption, or a
different email client or something but since it's a banking
environment there are strict rules about software:

Can't reduce security in exchange
Can't install 3rd party patches to licenced software
etc, etc...

I need a solution!!!
- is there a way to bypass the email client and directly send an email
from the exchange server without bringing a tonne of warining messages
down on my head?
- failing that, are there any other solutions other people here have
used?


If the OS is Windows 2K or XP then it already has CDOSys messaging library
installed and you can automate that instead of Outlook. If you Google on "CDO"
you should easily find code examples.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Apr 20 '06 #3
Sorry Rick and others.
I used the wrong account here...

Arno R

"StopThisAdvertising" <StopThisAdvertising@DataShit> schreef in bericht news:44**********************@text.nova.planet.nl. ..
I once tried CDO and noticed that one needs an open InternetConnection to use it.
So you would need to check for a connection first or only use CDO with a broadband (always open) connection.
Right/wrong?

Arno R

"Rick Brandt" <ri*********@hotmail.com> schreef in bericht news:t8*****************@newssvr12.news.prodigy.co m...
BillCo wrote:
Hi folks,

I have an a2k ap which is called from a batch file via task scheduler
on at night - it runs a bunch of updates, imports stuff from other
databases and generally preps the main backend for another day's work.
It logs everything and generates an email which it sends to a few
people, issuing warnings if there were problems. Have you guessed the
problem yet?

Outlook 2003 / SP2 - "...Trying to send a mail...", "...use address
book..." messages. Usually I'd install outlook redemption, or a
different email client or something but since it's a banking
environment there are strict rules about software:

Can't reduce security in exchange
Can't install 3rd party patches to licenced software
etc, etc...

I need a solution!!!
- is there a way to bypass the email client and directly send an email
from the exchange server without bringing a tonne of warining messages
down on my head?
- failing that, are there any other solutions other people here have
used?


If the OS is Windows 2K or XP then it already has CDOSys messaging library
installed and you can automate that instead of Outlook. If you Google on "CDO"
you should easily find code examples.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Apr 20 '06 #4
I've been working on a solution to this same problem and would
appreciate input/guidance (aside from handslaps I know I'll get for
using SendKeys).

Here's the code I've come up with. It works - bypassing the Outlook
Security messages - when run in real-time from the debug window. But
when scheduled to run overnight, even with screensaver disabled, it
essentially skipped over the SendKeys command and completed processing,
so that in the morning the email was displayed and ready to be sent.

Access 97, Outlook 2000, reference Outlook 10.0 Object Library...watch
for line wrap:
Public Sub SendEmail(strRecipients As String, strAttachment As String)
On Error GoTo Err_Handler

Dim olApp As Outlook.Application
Dim olMsg As Outlook.MailItem

Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(olMailItem)

With olMsg
.To = strRecipients
.Subject = "Daily Reconciliation File"
.attachments.Add (strAttachment)
.display
End With

SendKeys "%S"

Exit_Handler:

Set olMsg = Nothing
Set olApp = Nothing

Exit Sub

Err_Handler:
MsgBox Err.Description, vbOKOnly, "Error #" & Err.Number
Resume Exit_Handler

End Sub

Apr 20 '06 #5
Arno, you are probably right - considering you are required to specify
an email (smtp) server... I'm working on a network with an exchange
server though, so that's not a problem here.
(you're using the "StopThisAdvertising" Profile today - are you and sir
PC Datasheet playing tom and jerry again?)

Rick - thanks for the hint... gave me the push in the right direction I
was looking for (I was starting to look at writing my own API wrapper
to WinSock - you saved me a trip to the shrink). I managed to put
together somthing that works for me from bits of code posted by Lyle,
Pat and Tony (Thanks guys!).

For the benefit of others trying to sort this out:

To send an email from Access using VBA without getting warning
messages:-
"A program is trying to send e-mail on your behalf. Do you want to
allow this? If this is unexpected, it may be a virus and you should
chose "no""
or
"A program is trying to access email addresses you have stored in
outlook. Do you want to allow this? If this is unexpected, it may be a
virus and you should chose "no""

Include the CDO library and use this:

Sub SendMail()

Dim iCfg As CDO.Configuration
Dim iMsg As CDO.Message

Set iCfg = New CDO.Configuration

With iCfg
.Fields(cdoSMTPServer) = "Name or IP of SMTP Server"
.Fields(cdoSMTPServerPort) = 25 ' Usual setting
.Fields(cdoSendUsingMethod) = cdoSendUsingPort
.Fields(cdoSMTPConnectionTimeout) = 200
.Fields.Update
End With

Set iMsg = New CDO.Message
With iMsg
Set .Configuration = iCfg
.Sender = "Ar********@Steve.not"
.Subject = "Test"
.TextBody = "This is a test"
.To = "Ar********@Steve.not"
.Send
End With

Set iMsg = Nothing
Set iCfg = Nothing

End Sub

Apr 20 '06 #6

"BillCo" <co**********@gmail.com> schreef in bericht news:11**********************@i39g2000cwa.googlegr oups.com...
(you're using the "StopThisAdvertising" Profile today - are you and sir
PC Datasheet playing tom and jerry again?)
Allready apologized for using the wrong account in the thread here
.Sender = "Ar********@Steve.not"

But I guess you are right in that I don't really love jobhunting Steve...
Arno R
Apr 20 '06 #7
StopThisAdvertising wrote:
I once tried CDO and noticed that one needs an open
InternetConnection to use it.
So you would need to check for a connection first or only use CDO
with a broadband (always open) connection.
Right/wrong?


I am not aware of any such requirement. You need to point it at an SMTP
server (which we have on our LAN).
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 20 '06 #8
>But I guess you are right in that I don't really love jobhunting Steve...

I'm not a huge fan myself - as much as i do find it amusing when he
pops up giving wrong advice he robbed from somewhere that he
misunderstood... as an advertisement for himself! not so funny when
someone pays his services or subcontracts from him in good faith
though!!

Apr 21 '06 #9
Baz
"BillCo" <co**********@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hi folks,

I have an a2k ap which is called from a batch file via task scheduler
on at night - it runs a bunch of updates, imports stuff from other
databases and generally preps the main backend for another day's work.
It logs everything and generates an email which it sends to a few
people, issuing warnings if there were problems. Have you guessed the
problem yet?

Outlook 2003 / SP2 - "...Trying to send a mail...", "...use address
book..." messages. Usually I'd install outlook redemption, or a
different email client or something but since it's a banking
environment there are strict rules about software:

Can't reduce security in exchange
Can't install 3rd party patches to licenced software
etc, etc...

I need a solution!!!
- is there a way to bypass the email client and directly send an email
from the exchange server without bringing a tonne of warining messages
down on my head?
- failing that, are there any other solutions other people here have
used?


SendObject uses MAPI, which neatly bypasses the Outlook security messages.
It's a very simple solution, assuming that (i) it offers you enough
functionality and (ii) Outlook is the default mail client.

n.b. you don't have to send an object, you can easily use it to send email
without attachments.

Apr 22 '06 #10
the idea was to bypass outlook and connect directly to exchange.
sendobject is flaky and starts malfunctioning if it's used more than
once between outlook shutdown/restarts - its fairly well documented as
a bit of a desaster. Also, since it envokes the active outlook profile,
it triggers warning messages from exchange - which is what the problem
was in the first place.

I found a solution allowing connection to exchange via CDO without
envoking the outlook profile, which I posted. Working great so far!
(and looks like the basis of some potentially nasty spamware btw... why
ms would put such overkill warnings when using a legit outlook profile
without even the possibility of accepting signed aps automatically -
and then allow this gaping security hole is beyond me!)
-but thanks for the advice anyway :)

Apr 22 '06 #11
Baz

"BillCo" <co**********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
the idea was to bypass outlook and connect directly to exchange.
You also asked for "any other solutions".
sendobject is flaky and starts malfunctioning if it's used more than
once between outlook shutdown/restarts - its fairly well documented as
a bit of a desaster. Also, since it envokes the active outlook profile,
it triggers warning messages from exchange - which is what the problem
was in the first place.

Works fine for me.
I found a solution allowing connection to exchange via CDO without
envoking the outlook profile, which I posted. Working great so far!
(and looks like the basis of some potentially nasty spamware btw... why
ms would put such overkill warnings when using a legit outlook profile
without even the possibility of accepting signed aps automatically -
and then allow this gaping security hole is beyond me!)
-but thanks for the advice anyway :)


For a solution which doesn't use an email client, I've been using this for
years, works really well:

http://www.freevbcode.com/ShowCode.Asp?ID=109

Also, the code can easily be converted to VBA if you want to avoid
distributing the dll.
Apr 22 '06 #12
> sendobject is flaky and starts malfunctioning if it's used more than

Unless you apply A2K SR3, A2K2 SR2

(david)

"BillCo" <co**********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
the idea was to bypass outlook and connect directly to exchange.
sendobject is flaky and starts malfunctioning if it's used more than
once between outlook shutdown/restarts - its fairly well documented as
a bit of a desaster. Also, since it envokes the active outlook profile,
it triggers warning messages from exchange - which is what the problem
was in the first place.

I found a solution allowing connection to exchange via CDO without
envoking the outlook profile, which I posted. Working great so far!
(and looks like the basis of some potentially nasty spamware btw... why
ms would put such overkill warnings when using a legit outlook profile
without even the possibility of accepting signed aps automatically -
and then allow this gaping security hole is beyond me!)
-but thanks for the advice anyway :)

May 4 '06 #13
Really? I didn't know they'd fixed that! thanks...

May 4 '06 #14


"BillCo" <co**********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Really? I didn't know they'd fixed that! thanks...


I think we were just lucky it fell out of a security fix.

Certainly it looks like the only reason the fix worked for
A2K was because it was included in a service release that
was required for a security patch. And the flaw had been
around for a long time without any indication that there
was any intention to do anything about it.

(david)
May 5 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: McKirahan | last post by:
What is "active content"? My ASP page just returns HTML.... I have a page with an .htm extension that has a form whose action is an ASP page which generates a report after updating a database...
5
by: RWC | last post by:
Hello, I have a database that I need to connect with that resides on my personal intranet server. I'm on a different subnet than this server (running through two different gateways). When I...
1
by: Tom | last post by:
Hi, I am currently on a project where one site needs to send the user credentials to another site, through web services. Scenario: * "User 1" will authenticate to "Site A" using NTLM ("Site...
4
by: Dean Slindee | last post by:
I would like to provide a menu item that the users can click that launches the same "Windows Security" window that doing a Ctrl+Alt+Delete launches, but thru a Process.Start. Is this possible, and...
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
2
by: jvvhie | last post by:
Hello, I am writing a pure-Python game engine that interprets the code of game objects within the same process with the exec statement. My main goal is to make as much power available as possible...
19
by: hansBKK | last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning about PHP, mostly by researching, installing and playing with different scripts. I am looking for a host that will provide...
2
by: Mike McGuire | last post by:
I currently have a .NET 2.0 Application that uses "Security.SecureString" to securly pass a password to the process that I am starting within the app. I want to create something similar for a few of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.