Bypassing The Security Prompts

X

XcelSoft

Is there a sure workaround to bypassing the security
prompts Outlook pops up when using VB to send emails. I
have a large customer base that I need to email status
reports to and it would be impossible to sit and answer
the prompt each time. I posted this earlier and tried
the Redemption DLL but it only blocks one of the security
prompts and it puts the message in the Drafts box instead
of the Outbox (can't figure this one out).

It's amazing that M/S would put you through this amount
of headache just to send an email from your location. Put
the security feature but allow admin rights to bypass
it. It just doesn't make sense, unless I'm missing
something.

Thanks,

Xcelsoft
 
X

Xcelsoft

Thanks for the reply Dmitry,

here is the code that I'm using to send the emails with
Redemption.

objOutlookMsg.Save
Dim objSafeMail As Object
Set objSafeMail = CreateObject("Redemption.SafeMailItem")
objSafeMail.Item = objOutlookMsg
objSafeMail.Send


It just doesn't make sense that M/S would put that type
of security on sending emails without a valid way to
disable it.

Much appreciated,

Xcelsoft
 
X

Xcelsoft

Dmitry,

This is the M/S KB# 209948 exact code that is used before
the Redemption code:

Sub SendMessage(Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Nancy
Davolio")
objOutlookRecip.Type = olTo

' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("Andrew
Fuller")
objOutlookRecip.Type = olCC

' Set the Subject, Body, and Importance of the
message.
.Subject = "This is an Automation test with
Microsoft Outlook"
.Body = "Last test - I promise." & vbCrLf & vbCrLf
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add
(AttachmentPath)
End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send

End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub


Thanks,

Xcelsoft
 
D

Dmitry Streblechenko \(MVP\)

Instead of using
Set objOutlookRecip = objOutlookMsg.Recipients.Add("Nancy Davolio")
you need to use
Set objRedempRecip = objSafeMail.Recipients.Add("Nancy Davolio")


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

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