A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Changing the RFC822 header of a SafeMailItem using Redemption



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 5th 06, 11:50 AM posted to microsoft.public.outlook.program_vba
FLudewig
external usenet poster
 
Posts: 1
Default 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


Ads
  #2  
Old July 5th 06, 04:21 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catastrophic Failure while accessing Redemption.SafeMailItem.To and Recipients jisha Outlook and VBA 1 June 30th 06 06:48 PM
Changing calendar header and or footer Denisa Outlook - Calandaring 0 May 10th 06 04:03 PM
Redemption Christoph Add-ins for Outlook 5 March 6th 06 04:26 PM
Changing Calendar Header ejjlgl Outlook - Calandaring 1 February 7th 06 06:13 AM
Redemption MAPITable Dmitry Streblechenko Add-ins for Outlook 1 January 12th 06 05:09 AM


All times are GMT +1. The time now is 08:19 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-2025 Outlook Banter.
The comments are property of their posters.