Problem with Outlook Redemption

  • Thread starter Thread starter Amin Sobati
  • Start date Start date
A

Amin Sobati

Hi,
I have the following code in my app:

Set OA = CreateObject("Outlook.Application")
Set NS = OA.GetNamespace("MAPI")
Set k = OA.CreateItem(0)
k.Recipients.Add "(e-mail address removed)"
k.Subject = "test"
Set objSafeMail = CreateObject("Redemption.SafeMailItem")
k.save
Set objSafeMail.Item = k
objSafeMail.Send

This code does not put the new email in outbox, but puts in drafts folder.
How can I change code so that it sends my email to outbox folder?
Any help would be greatly appreciated,
Thanks,
Amin
 
That's normal with Redemption. The item will actually go out when a
scheduled send/receive is done (or a manual one) or you use Redemption's
MAPIUtils.DeliverNow method.
 
A message can be submitted from any folder. If you want to move the message
to the Outbox, do that before accessing it with Redemption:

Set k = OA.CreateItem(0)
set K = k.Move(MS.GetDefaultFolder(olFolderOutbox))

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