![]() |
Changing the RFC822 header of a SafeMailItem using Redemption
Hi,
I am using redemption in my application to send e-mails from a non-default account in Outlook. Since Redemption does generaly not allow sending from non-default account I tried the workaround described in the redemption FAQ: I add a named property ("From") to the outgoing message and force Outlook to use its name as RFC822 header and its value as the value of the header. This works fine in my machine but it won't on others. Here is my code: Set oOutlook = GetObject(, "Outlook.Application") 'open Session Set oSession = New Redemption.RDOSession oSession.Logon Set oItem = oOutlook.CreateItem(olMailItem) Set oSafeMailItem = New Redemption.SafeMailItem With oSafeMailItem .Item = oItem Tag = .GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From") .Fields(Tag) = "Someone " .Subject = .Subject 'to trick Outlook into thinking that something has changed .Save end with Any ideas? Is it the GUID maybe? Thanks for your help! F. Ludewig |
Changing the RFC822 header of a SafeMailItem using Redemption
It looks like you forgot the line where you OR the tag with the value for
PT_STRING8. That's totally necessary. I'm surprised it works at all without that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "FLudewig" wrote in message ... Hi, I am using redemption in my application to send e-mails from a non-default account in Outlook. Since Redemption does generaly not allow sending from non-default account I tried the workaround described in the redemption FAQ: I add a named property ("From") to the outgoing message and force Outlook to use its name as RFC822 header and its value as the value of the header. This works fine in my machine but it won't on others. Here is my code: Set oOutlook = GetObject(, "Outlook.Application") 'open Session Set oSession = New Redemption.RDOSession oSession.Logon Set oItem = oOutlook.CreateItem(olMailItem) Set oSafeMailItem = New Redemption.SafeMailItem With oSafeMailItem .Item = oItem Tag = .GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From") .Fields(Tag) = "Someone " .Subject = .Subject 'to trick Outlook into thinking that something has changed .Save end with Any ideas? Is it the GUID maybe? Thanks for your help! F. Ludewig |
All times are GMT +1. The time now is 03:48 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com