PC Review

Thread Tools Rate Thread

Sent Mail won't be removed from Draft for Redemption with Outlook 2010

New Member
Join Date: Jun 2012
Posts: 2
      15th Jun 2012
I try to follow the faq to send emails using redemption. I test the code using Outlook 2010 and GMail Pop3/smtp account. I use excel vba to call the outlook object without the active explorer. I notice that if I rem the SafeItem.save, my email would be sent but still stay at the draft folder. The sent one was never moved into the sent folder. After I checking if the sending was successful, the one in the draft folder would be sent again. In the end, I got two identical emails but with a different sent time stamp. Could anyone explain the mechanism?

I also test the same code on an Outlook 2007 machine but using an Exchange server account. My email simply stays at the draft folder without going anywhere. I try use MAPIUtils.DeliveryNow but still not working. Thanks for pointing out any direction in advance.

My code is attached below.

Dim Application As Outlook.Application
Dim NameSpace As Outlook.NameSpace
Dim SafeItem, oItem, Utils
Dim Btn As CommandBarControl
Dim sRecipient As Variant
Dim recipient As Outlook.recipient
Dim Sync As Outlook.SyncObject

Set Application = CreateObject("Outlook.Application")
Set NameSpace = Application.GetNamespace("MAPI")

Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
Set oItem = Application.CreateItem(olMailItem) 'Create a new message
SafeItem.Item = oItem 'set Item property
'Set SafeItem.SaveSentMessageFolder = NameSpace.GetDefaultFolder(olFolderSentMail)

With SafeItem
For Each sRecipient In Recipients
Set recipient = .Recipients.Add(sRecipient)
'recipient.Type = olTo
Next sRecipient
'For Each sRecipient In CCTo
' Set recipient = SafeItem.Recipients.Add(sRecipient)
' recipient.Type = olCC
'Next sRecipient
.Subject = Subject
.HTMLBody = SafeItem.Body & Content
End With
' (1) Use Sync object (this method works for outlook 2010 with gmail pop3 account)
'Sync object
Set Sync = NameSpace.SyncObjects.Item(1)

Set Application = Null
Set SafeItem = Nothing
Set oItem = Nothing
Set recipient = Nothing
Set Sync = Nothing
Set Utils = Nothing
Set Btn = Nothing
Reply With Quote
New Member
Join Date: Jun 2012
Posts: 2
      18th Jun 2012
Could anyone provide some advices please? I am run out of solutions!
Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are my Draft emails not being removed once they have been sent Roythornes_PB Microsoft Outlook Discussion 1 7th Apr 2011 03:38 PM
Sent item appear in draft folder, has the mail been sent or not? =?Utf-8?B?c25vdw==?= Microsoft Outlook Discussion 1 3rd Nov 2007 06:33 PM
why does e-mail actuallly sent sometimes remain in my Draft folder with yellow background alert:"This Message has not been sent" Nella Microsoft Outlook 0 27th Jun 2006 04:57 PM
Redemption e-mail going to draft folder =?Utf-8?B?c2ltb25rdWU=?= Microsoft Outlook Program Addins 0 14th Jun 2006 02:15 PM
redemption put outgoing messages in draft while outlook send them immediately Julia Microsoft Outlook Program Addins 5 29th Jun 2004 07:18 PM




All times are GMT +1. The time now is 01:48 AM.