Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2005

Tip: Looking for answers? Try searching our database.

Email - Using Redemption

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank B - 25 Jul 2003 20:13 GMT
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 "JoeDokes@Comcast.Net"
 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
Frank B - 26 Jul 2003 16:45 GMT
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

>-----Original Message-----
>To avoid the security dialog, tried "ClickYes" works
[quoted text clipped - 40 lines]
>
>.
Frank B - 28 Jul 2003 18:39 GMT
If using Outlook 2000 SP3, you will need to configure
as "C/W" as "Internet Only" mode has bugs.
Again, good luck...
Frank
>-----Original Message-----
>Just solved the mystery and want to share...  First, the
[quoted text clipped - 53 lines]
>>
>.
Bridget Elise Nelson - 31 Jan 2005 15:53 GMT
I take the above code and get the following error message:

Could not resove message recipients-2147467259.

below is the code as is without out the attachment part.

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
 '
SafeItem.Recipients.Add "bnelson[AT]hesc.com"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Body = "This is the SAFE.Body."
SafeItem.Save
SafeItem.Send

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

Thank you for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.