Email - Using Redemption


F

Frank B

To avoid the security dialog, tried "ClickYes" works
great. But wanted to try Redemption, and the following
does not include the ATTACHMENT in the Email. Same sort
of idea works fine with the Object Model. Any ideas why
no Attachment??? Thanks, Frank

Sub SafeSendEmail()
Dim MyApp As Object, MyNameSpace As NameSpace
Dim SafeItem, oItem, MyAttach
Set MyApp = CreateObject("Outlook.Application")
Set MyNameSpace = MyApp.GetNamespace("MAPI")
On Error GoTo SafeSendEmailERR
MyNameSpace.Logon
'
Set SafeItem = CreateObject("Redemption.SafeMailItem")
Set oItem = MyApp.CreateItem(0) ' Create a new message
SafeItem.Item = oItem ' Set Item property
type
'
Set MyAttach = SafeItem.Attachments
MyAttach.Add "C:\Test.txt" ' ??? Not working
SafeItem.Save ' ??? not sure if needed.
'
SafeItem.Recipients.Add "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Body = "This is the SAFE.Body."
SafeItem.Display
'Stop
SafeSendEmailEXIT:
Set MyAttach = Nothing
Set oItem = Nothing
Set SafeItem = Nothing
Set MyNameSpace = Nothing
Set MyApp = Nothing
Exit Sub
SafeSendEmailERR:
MsgBox "Outlook: " & Err.Description & Err
Stop
Resume Next
End Sub
 
Ad

Advertisements

F

Frank B

Just solved the mystery and want to share... First, the
code does work if you SafeItem.Send the email. The
attachment is attached, and sent. It is the
SafeItem.display that does not show the attachment, and
this is a documented MS bug (I actually read the MS
article), and there is no workaround. Aside: also, be
aware that SafeItem.Body blows away the existing format of
the body (also mentioned in MS article). Hope this helps
you.... Frank
 
Ad

Advertisements

F

Frank B

If using Outlook 2000 SP3, you will need to configure
as "C/W" as "Internet Only" mode has bugs.
Again, good luck...
Frank
 

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