PC Review


Reply
Thread Tools Rate Thread

Sent redemption message not added to Sent Items folder

 
 
Jack
Guest
Posts: n/a
 
      21st Apr 2005
I am using redemption to send an email message. Everything works fine
except I can never get a copy of the message in my sent items folder.
I have added a sample of my code below.

Set objSession = CreateObject("MAPI.Session")
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Fields(ActMsgPR_DELETE_AFTER_SUBMIT) = True
objMessage.Subject = sSubject
objMessage.Text = sText

Set objSafeMessage = CreateObject("Redemption.SafeMailItem")
objSafeMessage.Item = objMessage

Set objSafeRecipient = objSafeMessage.Recipients.Add(sRecip)
objSafeRecipient.Type = mapiTo
objSafeRecipient.Resolve

objSafeMessage.Send
objSession.DeliverNow
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      21st Apr 2005
Try setting the PR_SENT_MAIL_ENTRYID MAPI property to the entry id of the
Sent Items folder:

objSafeMessage.Fields(PR_SENT_MAILÂ*_ENTRYID) =
objSession.GetDefaultFolder(CdÂ*oDefaultFolderSentItems).EntryÂ*ID

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/

"Jack" wrote:

> I am using redemption to send an email message. Everything works fine
> except I can never get a copy of the message in my sent items folder.
> I have added a sample of my code below.
>
> Set objSession = CreateObject("MAPI.Session")
> Set objMessage = objSession.Outbox.Messages.Add
> objMessage.Fields(ActMsgPR_DELETE_AFTER_SUBMIT) = True
> objMessage.Subject = sSubject
> objMessage.Text = sText
>
> Set objSafeMessage = CreateObject("Redemption.SafeMailItem")
> objSafeMessage.Item = objMessage
>
> Set objSafeRecipient = objSafeMessage.Recipients.Add(sRecip)
> objSafeRecipient.Type = mapiTo
> objSafeRecipient.Resolve
>
> objSafeMessage.Send
> objSession.DeliverNow
>

 
Reply With Quote
 
 
 
 
Michael Bauer
Guest
Posts: n/a
 
      22nd Apr 2005
Hi Jack,

> objMessage.Fields(ActMsgPR_DELETE_AFTER_SUBMIT) = True


I think that´s it.

--
Viele Grüße
Michael Bauer - MVP Outlook


"Jack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have added a sample of my code below.
>
> Set objSession = CreateObject("MAPI.Session")
> Set objMessage = objSession.Outbox.Messages.Add
> objMessage.Subject = sSubject
> objMessage.Text = sText
>
> Set objSafeMessage = CreateObject("Redemption.SafeMailItem")
> objSafeMessage.Item = objMessage
>
> Set objSafeRecipient = objSafeMessage.Recipients.Add(sRecip)
> objSafeRecipient.Type = mapiTo
> objSafeRecipient.Resolve
>
> objSafeMessage.Send
> objSession.DeliverNow


 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      22nd Apr 2005
Ooh, good catch - I think you're right!

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/

"Michael Bauer" wrote:

> Hi Jack,
>
> > objMessage.Fields(ActMsgPR_DELETE_AFTER_SUBMIT) = True

>
> I think that´s it.
>
> --
> Viele Grüße
> Michael Bauer - MVP Outlook
>
>
> "Jack" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have added a sample of my code below.
> >
> > Set objSession = CreateObject("MAPI.Session")
> > Set objMessage = objSession.Outbox.Messages.Add
> > objMessage.Subject = sSubject
> > objMessage.Text = sText
> >
> > Set objSafeMessage = CreateObject("Redemption.SafeMailItem")
> > objSafeMessage.Item = objMessage
> >
> > Set objSafeRecipient = objSafeMessage.Recipients.Add(sRecip)
> > objSafeRecipient.Type = mapiTo
> > objSafeRecipient.Resolve
> >
> > objSafeMessage.Send
> > objSession.DeliverNow

>
>

 
Reply With Quote
 
 
 
Reply

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 do 'sent items' not appear in sent items folder (box is check. =?Utf-8?B?c2NvdXNlcjE=?= Microsoft Outlook Discussion 3 20th May 2005 06:15 AM
Copies of sent mail go to Sent Items folder instead of other mailbox Sent folder. Spin Microsoft Outlook 0 22nd Sep 2004 03:21 PM
Copies of sent mail go to my Sent Items folder instead of other mailbox Sent folder. Spin Microsoft Outlook 0 21st Sep 2004 02:59 PM
sent items not in sent items folder Rodney Demko Microsoft Outlook 0 10th Dec 2003 09:13 PM
How do I programmatically tell Outlook to not save a copy of a message in the Sent Items folder and Deleted Items folder when forwarding and then deleting a message? Gary Microsoft Outlook VBA Programming 4 17th Sep 2003 05:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:34 PM.