Bypass security popups when reading mail OL2003

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

Hi-
I have a reader for my website email and it use to work when I had OL97
After upgrading to OL2003, I have constant security prompts for each mail
message. I'm not a power programmer. Can someone help?
Thanks
Ken

Code that reads in email messages and extracts info from them:
Sub ReadEmail_V1_1_Outlook97()
'Worked with outlook 97 cdo.dll 1.1, causes constant
'security popups with outlook 2003
Dim TmpRst As Recordset
Dim OlApp As Outlook.Application
Dim NS As Outlook.NameSpace
Dim Inbox As Outlook.MAPIFolder
Dim MI As Object
Dim Address, EnID, StID As String
'Dim Sess As MAPI.Session
'Dim ActMsg As MAPI.Message


Set DB = OpenDatabase("C:\My Documents\Ken1.mdb")

Set OlApp = New Outlook.Application
Set NS = OlApp.GetNamespace("mapi")
Set Inbox = NS.GetDefaultFolder(olFolderInbox)
'Set TmpRst = DB.OpenRecordset("Email")

For Each MI In Inbox.Items
With RS 'TmpRst

'Check for exact same email in DB
Sender = MI.SenderName '<---------------Causes security trap
EDate = MI.SentOn

'FindDupRecord

If Not EmailFound Then
.AddNew
!Sender = MI.SenderName

'Required to extract return email from outlook
' Set Sess = CreateObject("mapi.session")
' Sess.Logon "", "", False, False
' Set ActMsg = Sess.GetMessage(MI.EntryID, MI.Parent.StoreID)
!rtnemail = GetSenderAddress(MI)
'!rtnemail = Left$(ActMsg.Fields.Item(12).Value, 100)

!emaildate = MI.SentOn
!Subject = MI.Subject
!Body = MI.Body
.Update
End If
End With
Next

End Sub
 
Thanks.
Is the an example of code that reads in messages and extracts info from them
without triggering the security popup? Im trying to do this without a 3rd
party program if possible.
Thanks
 
Nope. SenderEmailAddress property is blocked. There is no way around that
using the Outlook Object Model or CDO 1.21.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Back
Top