Workaround Security message "...trying to automatically send e-mail

P

Procuro

For quite some time I've been using the peace of code,
which I've cut short to the essential part, from within
Access to send e-mails. Until today everything as run
smoothly, but since XP has been installed Outlook is
always replying with:

Security message "...trying to automatically send e-mail
on your behalf

the same goes for the command docmd. SendObject.

Since I use both ways to send large numbers of e-mails per
day I'm getting desperate.

Is there a way, programmatically, to workaround the
security message, i.e., saying to Outlook that the
messages are genuine and from a trustworthy part?

Thank you for the help

Dim objApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFoldSent As Outlook.mapiFolder
Dim Mail_msg As MailItem

Set objApp = CreateObject("Outlook.Application")
Set myNamespace = objApp.GetNamespace("MAPI")

Set myFoldSent = myNamespace.GetDefaultFolder
(olFolderSentMail)

Set Mail_msg = objApp.CreateItem(olMailItem)
Mail_msg.Subject = "Algo."
Mail_msg.Body = "O que se quiser." _
& vbNewLine & vbNewLine _
& "Algo mais!"
Mail_msg.To = "receivers name"

Mail_msg.Send

Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing
 
R

Rick Brandt

Procuro said:
For quite some time I've been using the peace of code,
which I've cut short to the essential part, from within
Access to send e-mails. Until today everything as run
smoothly, but since XP has been installed Outlook is
always replying with:

Security message "...trying to automatically send e-mail
on your behalf

the same goes for the command docmd. SendObject.

Since I use both ways to send large numbers of e-mails per
day I'm getting desperate.

Is there a way, programmatically, to workaround the
security message, i.e., saying to Outlook that the
messages are genuine and from a trustworthy part?

Thank you for the help

Dim objApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFoldSent As Outlook.mapiFolder
Dim Mail_msg As MailItem

Set objApp = CreateObject("Outlook.Application")
Set myNamespace = objApp.GetNamespace("MAPI")

Set myFoldSent = myNamespace.GetDefaultFolder
(olFolderSentMail)

Set Mail_msg = objApp.CreateItem(olMailItem)
Mail_msg.Subject = "Algo."
Mail_msg.Body = "O que se quiser." _
& vbNewLine & vbNewLine _
& "Algo mais!"
Mail_msg.To = "receivers name"

Mail_msg.Send

Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing


As long as your automating Outlook or MAPI there is nothing you can do about
this on the client. If you are using Exchange the Exchange admins have some
control over it.
 
D

david epsom dot com dot au

But note that the 'exchange' ISAM is actually a
MAPI ISAM - it was labelled by marketing types, not
computer geeks.

(david)
 
D

david epsom dot com dot au

For a start, I never 'SEND', I only SAVE.
The user can send all the messages (which are sitting
in the outbox, ready to go) when she is ready to do
so.

That still leaves you with some messages: it may be
good enough.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top