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

  • Thread starter Thread starter Procuro
  • Start date Start date
P

Procuro

Can some one help me, since I'm getting despaired.

I've been using the peace of code below to send messages
through Oulook. Until now everything has been going fine
and smoothly, but since I've begun using windows XP, I've
been receiving the following message

....trying to automatically send e-mail on your behalf .
chose yes ..

Is there a way, programmatically, to work around it, I
mean to force the yes so the message can be dealt with
automatically?

Thanks

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 = "some one"

Mail_msg.Send

Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing
 
Procuro said:
Can some one help me, since I'm getting despaired.

I've been using the peace of code below to send messages
through Oulook. Until now everything has been going fine
and smoothly, but since I've begun using windows XP, I've
been receiving the following message

...trying to automatically send e-mail on your behalf .
chose yes ..

Is there a way, programmatically, to work around it, I
mean to force the yes so the message can be dealt with
automatically?

If there was an easy way a virus could use the same process.

There are several solutions. See the Outlook specific links at the
Access Email FAQ at my website.
http://www.granite.ab.ca/access/email/outlook.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Back
Top