Error getting recipient at sending new mails with Redemption

S

Stefan Uhlemann

hi,

i have much trouble with sending mails with redemption.

Following scenario:
I "auto-forward" from a database information as emails to the own outlook ms
exchange inbox (So sender and recipient will be the same)

I solved it like this:

----------------------------------------------------------------------

Dim MailItem As Outlook.MailItem
Dim SafeItem As Redemption.SafeMailItem
Dim SafeRecp As Redemption.SafeRecipient

Set MailItem = OLApp.CreateItem(olMailItem)
Set SafeItem = CreateObject("Redemption.SafeMailItem")

With SafeItem
.Item = MailItem
.Subject = "Funny mail from me to myself"
.Body = "Example body with much of information...."

' --> Here the trouble begins... SafeRecp never can
be Resolved...
' --> Whatever i´m trying... .Recipients.AddEx or
..Recipients.Add
' --> SafeRecpt alway is Nothing

' --> Even if i use
".Recipients.Add([email protected])"

Set SafeRecp = .Recipients.AddEx(SafeCurrentUser.Name,
SafeCurrentUser.Address, "EX", olTo)
.Recipients.ResolveAll ' Recipients.Count even returns zero
after that

.Send


' -->Because of missing recpipient Outlook will
place the mailitem in Drafts-folder... and nothing more happens
' -->Outlook 2000 sometimes seems to work with
this code... but later versions are failing

End With

----------------------------------------------------------------------

Seems to be a simple problem but i have no idea to solve it :(

Thank you

Stefan
 
D

Dmitry Streblechenko

What is your version of Redemption?
After creating the OLApp object, do you have code similar to the following:

set NS = OLApp.GetNamespace("MAPI")
NS.Logon

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

Stefan Uhlemann

Dmitry Streblechenko said:
What is your version of Redemption?
After creating the OLApp object, do you have code similar to the
following:

set NS = OLApp.GetNamespace("MAPI")
NS.Logon

Seems i found the problem...
Namespace was set to Nothing within code.

Thank you

Stefan
 

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