Create one-off that does send winmail.dat

Status
Not open for further replies.
N

Nick

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:mygateway@domain.com]" 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 "mygateway@domain.com" 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...
 
D

Dmitry Streblechenko

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)

-

"Nick" <npeck@community.nospam> wrote in message

news:9EDADBD5-899D-49DB-9665-003A158440FC@microsoft.com...
> 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:mygateway@domain.com]" 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 "mygateway@domain.com" 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...
 
N

Nick

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)
>

>

>

> -
> "Nick" <npeck@community.nospam> wrote in message
> news:9EDADBD5-899D-49DB-9665-003A158440FC@microsoft.com...
> > 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:mygateway@domain.com]" 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 "mygateway@domain.com" 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...


> .
>
 
N

Nick

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)
>

>

>

> -
> "Nick" <npeck@community.nospam> wrote in message
> news:9EDADBD5-899D-49DB-9665-003A158440FC@microsoft.com...
> > 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:mygateway@domain.com]" 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 "mygateway@domain.com" 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...


> .
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J OL2010 Create a new task while off line Exchange Server Administration 3
C Create Meeting With Custom Form Outlook VBA and Custom Forms 3
D Create advanced search (email) via VBA with LONG QUERY (>1024 char) Outlook VBA and Custom Forms 2
G Create ordinal numbers for birthday Outlook VBA and Custom Forms 2
O Outlook 365 - How to create / copy a new contact from an existing one? Using Outlook 3
D Create new email from the received Email Body with attachment Outlook VBA and Custom Forms 10
A How to create fixed signatures for aliases that process through GMAIL? Outlook VBA and Custom Forms 0
P Can I create a Rule that sends me an email when I get a Task? Using Outlook 2
M How create a Rule to filter sender's email with more that one @ sign Using Outlook 1
B Can I create a local PST file for SPAM on a drive that is usually disconnected? Using Outlook 3
Chiba Create an appointment for all the members Outlook VBA and Custom Forms 1
S Create a clickable custom column field Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
C Can't create Outlook data file Outlook Wishlist 0
L automaticaly create a teams meeting with a sync Using Outlook 0
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0
S Create A Search Folder That Looks For Message Class? Outlook VBA and Custom Forms 0
F How to create phone number as links in notes of Contacts Using Outlook 2
Nessa Can't create new appointment Using Outlook 1
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
C Create new Message with shared contacts & BCC'ing recipients Outlook VBA and Custom Forms 0
O Multiple email accounts - hesitate to create a new profile Using Outlook 3
G Can't create Folder Groups in Outlook 2013 Using Outlook 0
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
R Can not create folder to store specific emails in in Outlook for Mac Using Outlook 1
W Create Search Folder excluding Specific Email Addresses Using Outlook 5
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
JackBlack What tools do you use to create the signature for email? Using Outlook 3
Rupert Dragwater How to create a new email with @outlook.com Using Outlook.com accounts in Outlook 32
F Should a new email account also create new contacts Using Outlook 2
D create an html table in outlook custom form 2010 using vba in MsAccess Outlook VBA and Custom Forms 7
R Outlook add-in to create new contact from an email. Using Outlook 0
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
Q Script to create a pst file for Archiving Using Outlook 1
Jennifer Murphy Can I create a Rule with Or'd conditions? Using Outlook 1
D Outlook macros to create meeting on shared calendar Outlook VBA and Custom Forms 10
G How do I create a custom pick list in VB for an outlook automated email? Outlook VBA and Custom Forms 1
L Create Custom Form Using Outlook 0
Diane Poremsky Create a Task when a Message is Flagged Using Outlook 0
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
Diane Poremsky Create a custom field for Outlook messages Using Outlook 0
Mark White vba to create a shared mailbox folder Outlook VBA and Custom Forms 3
Diane Poremsky Automatically create a task when sending a message Using Outlook 0
Diane Poremsky Create a Custom Numbering Field for Outlook messages Using Outlook 0
Diane Poremsky Create a Series of Tasks using VBA Using Outlook 0
J create .pst data file for new gmail account Using Outlook.com accounts in Outlook 1
Diane Poremsky Create an Organizational Forms Library Using Outlook 0
Diane Poremsky Create an Organizational Forms Library in Exchange 2013 or Office 365 Using Outlook 0

Similar threads

Top