PC Review


Reply
Thread Tools Rate Thread

Create one-off that does send winmail.dat

 
 
Nick
Guest
Posts: n/a
 
      7th Apr 2010
For years we've used the "Exchange Extensions" function SetRecipients() that
lets you use Extended MAPI to create an address list and then add that list
to a message that the user is composing. Of course with Outlook 2010
Exchange Extensions are gone. This functionality is required because we need
to create one-off addresses that force winmail.dat to be sent to the
recipient. I know that most people want to get rid of winmail.dat, but we
need it because our users can send messages to our SMTP gateway that parses
winmail.dat. This SMTP gateway is "legacy" code that I can't change.

Using the newer Outlook object model and adding recipients to a MailItem
would be nice, if only it would allow me to enable the "send rich info"
behavior. But it appears that Microsoft has eliminated this functionality by
not providing a means for a programmer to create a one-off in a message that
is being composed that would force winmail.dat to be sent to the recipient
(you can do this manually in Outlook by changing the "Internet format" for an
address to "Send using Outlook Rich Text format").

I'm familiar with Extended MAPI, so I've tried using ModifyRecipients() to
add a one-off to a IMessage obtained from a MailItem.MAPIOBJECT, but there
appears to be a disconnect between the Extended MAPI world and the MailItem,
and the recipients in the MailItem are not changed (don't appear). Also,
I've tried using the object model technique, adding a recipient like so
"Name[EX:(E-Mail Removed)]" that causes Outlook to enable the "send rich
info" the way I want, but that's not the address I want to send to, I want it
to go via SMTP to "(E-Mail Removed)" and not an EX: address.

I know how to write add-ins and create ribbons for user-interface changes,
but I'm at a loss for how to add a one-off recipient to a message that a user
is composing, that forces the properties to send winmail.dat to that
recipient (i.e., Internet format = Send using Outlook Rich Text format), and
have that new address appear in the list of recipients that the user sees.

Any suggestions? Thanks in advance...
 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      7th Apr 2010
When exactly do you add the recipients? When yo uare using Extended MAPi
(be that from ECE or from MailItem.MAPIOBJECT), OOM has hard time seeing the
changes, but there are some workarounds.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Nick" <(E-Mail Removed)> wrote in message
news:9EDADBD5-899D-49DB-9665-(E-Mail Removed)...
> For years we've used the "Exchange Extensions" function SetRecipients()
> that
> lets you use Extended MAPI to create an address list and then add that
> list
> to a message that the user is composing. Of course with Outlook 2010
> Exchange Extensions are gone. This functionality is required because we
> need
> to create one-off addresses that force winmail.dat to be sent to the
> recipient. I know that most people want to get rid of winmail.dat, but we
> need it because our users can send messages to our SMTP gateway that
> parses
> winmail.dat. This SMTP gateway is "legacy" code that I can't change.
>
> Using the newer Outlook object model and adding recipients to a MailItem
> would be nice, if only it would allow me to enable the "send rich info"
> behavior. But it appears that Microsoft has eliminated this functionality
> by
> not providing a means for a programmer to create a one-off in a message
> that
> is being composed that would force winmail.dat to be sent to the recipient
> (you can do this manually in Outlook by changing the "Internet format" for
> an
> address to "Send using Outlook Rich Text format").
>
> I'm familiar with Extended MAPI, so I've tried using ModifyRecipients() to
> add a one-off to a IMessage obtained from a MailItem.MAPIOBJECT, but there
> appears to be a disconnect between the Extended MAPI world and the
> MailItem,
> and the recipients in the MailItem are not changed (don't appear). Also,
> I've tried using the object model technique, adding a recipient like so
> "Name[EX:(E-Mail Removed)]" that causes Outlook to enable the "send
> rich
> info" the way I want, but that's not the address I want to send to, I want
> it
> to go via SMTP to "(E-Mail Removed)" and not an EX: address.
>
> I know how to write add-ins and create ribbons for user-interface changes,
> but I'm at a loss for how to add a one-off recipient to a message that a
> user
> is composing, that forces the properties to send winmail.dat to that
> recipient (i.e., Internet format = Send using Outlook Rich Text format),
> and
> have that new address appear in the list of recipients that the user sees.
>
> Any suggestions? Thanks in advance...



 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      7th Apr 2010
Hi Dmitry,

For Outlook 2010 I have a ribbon with a RibbonType of
Microsoft.Outlook.Mail.Compose, and when the user clicks a button in my
ribbon I open a dialog to get some information, and then add the recipient.
The process is interactive with the user because it's done during the mail
compose user interface.

private void button1_Click(object sender,RibbonControlEventArgs e)
{
Outlook.Application application = Globals.ThisAddIn.Application;
Outlook.Inspector inspector = application.ActiveInspector();
Outlook.MailItem myMailItem = (Outlook.MailItem)inspector.CurrentItem;

// show my dialog to get some info, then add the recipient
}


"Dmitry Streblechenko" wrote:

> When exactly do you add the recipients? When yo uare using Extended MAPi
> (be that from ECE or from MailItem.MAPIOBJECT), OOM has hard time seeing the
> changes, but there are some workarounds.
>
> --
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -
> "Nick" <(E-Mail Removed)> wrote in message
> news:9EDADBD5-899D-49DB-9665-(E-Mail Removed)...
> > For years we've used the "Exchange Extensions" function SetRecipients()
> > that
> > lets you use Extended MAPI to create an address list and then add that
> > list
> > to a message that the user is composing. Of course with Outlook 2010
> > Exchange Extensions are gone. This functionality is required because we
> > need
> > to create one-off addresses that force winmail.dat to be sent to the
> > recipient. I know that most people want to get rid of winmail.dat, but we
> > need it because our users can send messages to our SMTP gateway that
> > parses
> > winmail.dat. This SMTP gateway is "legacy" code that I can't change.
> >
> > Using the newer Outlook object model and adding recipients to a MailItem
> > would be nice, if only it would allow me to enable the "send rich info"
> > behavior. But it appears that Microsoft has eliminated this functionality
> > by
> > not providing a means for a programmer to create a one-off in a message
> > that
> > is being composed that would force winmail.dat to be sent to the recipient
> > (you can do this manually in Outlook by changing the "Internet format" for
> > an
> > address to "Send using Outlook Rich Text format").
> >
> > I'm familiar with Extended MAPI, so I've tried using ModifyRecipients() to
> > add a one-off to a IMessage obtained from a MailItem.MAPIOBJECT, but there
> > appears to be a disconnect between the Extended MAPI world and the
> > MailItem,
> > and the recipients in the MailItem are not changed (don't appear). Also,
> > I've tried using the object model technique, adding a recipient like so
> > "Name[EX:(E-Mail Removed)]" that causes Outlook to enable the "send
> > rich
> > info" the way I want, but that's not the address I want to send to, I want
> > it
> > to go via SMTP to "(E-Mail Removed)" and not an EX: address.
> >
> > I know how to write add-ins and create ribbons for user-interface changes,
> > but I'm at a loss for how to add a one-off recipient to a message that a
> > user
> > is composing, that forces the properties to send winmail.dat to that
> > recipient (i.e., Internet format = Send using Outlook Rich Text format),
> > and
> > have that new address appear in the list of recipients that the user sees.
> >
> > Any suggestions? Thanks in advance...

>
>
> .
>

 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      9th Apr 2010
I found that the recipients can be accessed and modified by Extended MAPI in
the message at MailItem.MAPIOBJECT, but only when the
MailItem.BeforeCheckNames event is called when the user clicks Send. So I'm
able to add a recipient using the object model while the message is being
composed (the user can see the new recipient), and then when the user clicks
Send I can use Extended MAPI to modify recipients going to my gateway,
replacing the recipient with a new one-off making sure that "send rich info"
is enabled. Not ideal, but it seems to work. I hope that Microsoft doesn't
remove the ability to modify recipients with Extended MAPI off of the
BeforeCheckNames event, or I would have a real problem!

"Dmitry Streblechenko" wrote:

> When exactly do you add the recipients? When yo uare using Extended MAPi
> (be that from ECE or from MailItem.MAPIOBJECT), OOM has hard time seeing the
> changes, but there are some workarounds.
>
> --
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -
> "Nick" <(E-Mail Removed)> wrote in message
> news:9EDADBD5-899D-49DB-9665-(E-Mail Removed)...
> > For years we've used the "Exchange Extensions" function SetRecipients()
> > that
> > lets you use Extended MAPI to create an address list and then add that
> > list
> > to a message that the user is composing. Of course with Outlook 2010
> > Exchange Extensions are gone. This functionality is required because we
> > need
> > to create one-off addresses that force winmail.dat to be sent to the
> > recipient. I know that most people want to get rid of winmail.dat, but we
> > need it because our users can send messages to our SMTP gateway that
> > parses
> > winmail.dat. This SMTP gateway is "legacy" code that I can't change.
> >
> > Using the newer Outlook object model and adding recipients to a MailItem
> > would be nice, if only it would allow me to enable the "send rich info"
> > behavior. But it appears that Microsoft has eliminated this functionality
> > by
> > not providing a means for a programmer to create a one-off in a message
> > that
> > is being composed that would force winmail.dat to be sent to the recipient
> > (you can do this manually in Outlook by changing the "Internet format" for
> > an
> > address to "Send using Outlook Rich Text format").
> >
> > I'm familiar with Extended MAPI, so I've tried using ModifyRecipients() to
> > add a one-off to a IMessage obtained from a MailItem.MAPIOBJECT, but there
> > appears to be a disconnect between the Extended MAPI world and the
> > MailItem,
> > and the recipients in the MailItem are not changed (don't appear). Also,
> > I've tried using the object model technique, adding a recipient like so
> > "Name[EX:(E-Mail Removed)]" that causes Outlook to enable the "send
> > rich
> > info" the way I want, but that's not the address I want to send to, I want
> > it
> > to go via SMTP to "(E-Mail Removed)" and not an EX: address.
> >
> > I know how to write add-ins and create ribbons for user-interface changes,
> > but I'm at a loss for how to add a one-off recipient to a message that a
> > user
> > is composing, that forces the properties to send winmail.dat to that
> > recipient (i.e., Internet format = Send using Outlook Rich Text format),
> > and
> > have that new address appear in the list of recipients that the user sees.
> >
> > Any suggestions? Thanks in advance...

>
>
> .
>

 
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
I can send but not receive any emails in WinMail JFZissler Windows Vista Mail 2 28th Oct 2008 08:34 AM
Cant send emails with WinMail =?Utf-8?B?bWljaGVsZWlzZnJlZQ==?= Windows Vista Mail 2 17th Aug 2007 05:12 AM
can't send email in Winmail - says no connection =?Utf-8?B?RmFycmVu?= Windows Vista Mail 3 31st Mar 2007 01:28 AM
when I send an attach to a Mac user he can't open (winmail)? =?Utf-8?B?dGhpZXJyeQ==?= Microsoft Outlook Installation 1 20th Jun 2006 02:07 PM
Can't get attachments to send other than as winmail.dat =?Utf-8?B?dGhlYTE5NjM=?= Microsoft Outlook Discussion 2 25th Oct 2005 03:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:13 AM.