[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

Sending an email without MAPI controls, security problem with Outlook

Running VB6 executable on several client machines.  Using an email to generate a receipt of an event for the user that emails the user.  I've been using this code a lot without any problems, until today.  

An error occurred that stated something like "Email addresses are being accessed.  Breach of security."  My assumption is that the client machine has a security feature on her MS Outlook that is causing this.  (No one else is getting this error).

My question is:  
Does anyone know what that MS Outlook feature is and how she can disable it (she probably doesn't even know it's there)

OR

Does anyone know how to work around it from code?

Sub SendAnEmailWithoutMAPI(strRecipient As String, strSubject As String, strText As String, strAttachment As String)

'This doesn't need any MAPI controls, just reference to Microsoft Outlook Library 9.0
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem

Set objMail = objOutlook.CreateItem(olMailItem)
'Where olMailItem is a built-in constant = 0 indicating the type of item to create

objMail.Recipients.Add strRecipient
objMail.Subject = strSubject
objMail.body = strText
If strAttachment <> "" Then
    'For this purpose, assume 1 file is attached
    objMail.Attachments.Add strAttachment, olByValue, Len(strText) + 1, ExtractFileNameFromPath(strAttachment)
End If
objMail.Send

Set objMail = Nothing
Set objOutlook = Nothing

End Sub
0
MariaHalt
Asked:
MariaHalt
  • 2
1 Solution
 
bruintjeCommented:
Hi MariaHalt,

you can use this alternative
source: http://www.freevbcode.com/ShowCode.Asp?ID=109

hope this helps a bit
bruintje
0
 
bruintjeCommented:
the email security of outlook is not to be circumvented only with the redemption controls
http://www.dimastr.com/redemption/
0
 
MariaHaltAuthor Commented:
Also, it turned out that the user never checked off the "save password" in her Outlook, so she was typing it in everytime she accessed her email...I suggested she check it off and lock her computer whenever she leaves her desk (like she should be doing anyway).
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now