Re: Code example for foreign connector (c#) for Exchange 2007
- From: David <david.marcil@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 03 Mar 2008 22:06:13 -0500
MimeDocument mdMimeDoc = email.MimeDocument;
HeaderList hlHeaderlist = mdMimeDoc.RootPart.Headers;
Header mhProcHeader = hlHeaderlist.FindFirst("X-Receiver");
if (mhProcHeader == null)
{
MimeNode fhFirstHeader = hlHeaderlist.FirstChild;
TextHeader nhNewHeader = new TextHeader("X-Receiver",
"<user@domain>");
hlHeaderlist.InsertBefore(nhNewHeader, fhFirstHeader);
}
On Mon, 03 Mar 2008 20:56:58 -0500, David
<david.marcil@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Ok...read up some more on the replay directory and looks like I have.
to use the "X-Receiver". For anone who reads this and is interested I
copied some doc from Microsoft Exchange TechCenter below. One last
question to you David...how did you add the X-Headers to the email
object as the Microsoft.Exchange.Data.Transport.Email does not support
it.
X-Receiver: This X-Header replaces the To: message header field
requirement in a typical SMTP message. At least one X-Receiver: field
that contains one e-mail address must exist. Multiple X-Receiver:
fields are allowed for multiple recipients. The Replay directory
ignores the To: message header fields if they are present, although
the recipient's e-mail client displays the values of the To: message
header fields as the recipients of the message.
On Mon, 03 Mar 2008 19:35:02 +0000, David Lowndes
<DavidL@xxxxxxxxxxxxxxx> wrote:
for example, lets say my foreign users are of EDK address types with
domain of foreign.acme.
I'm not sure what you mean by an "EDK address type" - do you mean
whether the address space of the gateway is "SMTP", "X400", or some
other name - or something different?
The Exchange users have a secondary EDK
address of exchange.acme.
Is that so you can lookup users on the Exchange system as though they
were addressed using the foreign address formats?
If I am a foreign user and I email a letter
to 2 foreign users and 1 exchange user, I want the header for the
exchange user to show the 2 foreign users as well.
OK, in an EX2003 gateway, doesn't that equate to putting all the
recipient addresses on the content message and only the Exchange
recipients on the message envelope?
whereas the I would use the
"post to" for the Exchange user, and I would set the "display to" to
be all three users.
Again, I'm not familiar with the terminology you're using - I don't
recall hearing of a "post to" - but I'm no expert in this field, so I
might not just know. What does "post to" equate to in MAPI terms?
Using the "post to" stopped the original email
from coming back to the foreign users when I post it thru the gateway.
OK, so without this "post to" that you refer to, your gateway passed a
message addressed to all 3 recipients on to Exchange. Exchange
couldn't find mailboxes for those recipients so it would try to route
those back out of your gateway - and presumably you'd then have
problems with the messages re-circulating?
So after the email is delivered, if the Exchange user hits reply all,
it goes back to the 3 foreign users.
In the world I'm more familiar with, as I mentioned before, all
recipient addresses would be on the content part of the message (which
is a message type attachment of the outer MAPI message) while the
outer envelope would have had only the Exchange recipient. The routing
is done on the envelope recipients, so the circulating issue wouldn't
occur.
If I set the TO in the Microsoft.Exchange.Data.Transport.Email to show
both the foreign and Exchange users, will I get a email back coming
thru the connector?
I'm not sure - try it and see what happens. Normally the To: header
contains all the recipients (equivalent to the content message in a
MAPI gateway).
I suspect your issue may be that in your gateway you don't have any
differentiation between the envelope and content recipients - and (in
a brief reading) it appears that SMTP headers (which would contain the
envelope recipients) are often stripped from the normal headers
received from a POP3 mailbox - though sometimes there may be a residue
in an X header, such as "X-Envelope-To", or "X-Original-To", or it may
be parsed from the "Received" (for section) header.
Do I use the "ReplyTo" attribute similar to the
old "post to" of MAPI
As I don't know what "post to" is, I can't say.
Did you keep the EDK address space for your new gateway (for
replyability of the old emails)?
I'm not sure what you mean there. In our gateways the user (admin) can
configure the address space.
Dave
- References:
- Re: Code example for foreign connector (c#) for Exchange 2007
- From: David Lowndes
- Re: Code example for foreign connector (c#) for Exchange 2007
- From: David
- Re: Code example for foreign connector (c#) for Exchange 2007
- From: David Lowndes
- Re: Code example for foreign connector (c#) for Exchange 2007
- From: David
- Re: Code example for foreign connector (c#) for Exchange 2007
- Prev by Date: Re: Code example for foreign connector (c#) for Exchange 2007
- Next by Date: Re: Code example for foreign connector (c#) for Exchange 2007
- Previous by thread: Re: Code example for foreign connector (c#) for Exchange 2007
- Next by thread: Re: Code example for foreign connector (c#) for Exchange 2007
- Index(es):
Relevant Pages
|