RE: repost: problem compiling Managed Sink Wrapper for SMTP
- From: Joel Aufgang <JoelAufgang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Apr 2005 10:00:02 -0700
Thanks for the response.
The assemblies I'm trying to work with are
Microsoft.Exchange.Transport.EventInterop.dll and
Microsoft.Exchange.Transport.EventWrappers.dll
The download associated with that article contains a makefile which
generates Microsoft.Exchange.Transport.EventInterop.dll. That has been
created successfully. The same download also contains some c# source code
for an EventWrapper class, which references the EventInterop.dll and
instructions to compile that code into
Microsoft.Exchange.Transport.EventWrappers.dll.
The problem occurs during this second step. I get about 20 compiler errors
becasue the EventWrapper class is calling methods from the EventInterop.dll,
but the signatures of the method call don't match up with the methods in the
dll. I gave one example in my original post, where the
MailMsgPropertyBagWraper.cs is calling the GetPropertry method in the interop
class and is passing an IntPtr as one of the arguments but the method in the
dll is expecting 'out byte'
I dont understand why the source code doesnt use the same method signatures
as the EventInterop.dll. I am building the interop dll and the wrapper dll
using code from the same MSDN download package, so i would expect they would
be consistent with each other.
To answer you question about what i mean by "recieve smtp mail", I have a
web app that suports internal messaging between users within the system,
users and messages are stored in an application database. Users can also opt
to have messages that are sent to them forwarded to their email address, and
that is working. Now we would like to add functionality so that messages
that are sent by email can be replied to via email, and the web app would
recieve those emails, parse them and drop them into the mesage table in the
application database.
This is a redistriubutable app that is packaged in an .msi installer, and we
need to setup of this to be as simple automatic as possible. I want to
simply use the IIS SMTP server, since I don't expect Exchange will be
installed on the majority of the servers running this app. Emails sent out
will be sent out with the "from" address as
sendersLoginID@xxxxxxxxxxxxxxxxxxxx So the way I see it, I will need to have
the installer register an SMTP sink on the server so that the SMTP server
will pass any incoming mail to the web app. The only manual step to seting
this up other than running the installer should be adding a DNS MX record for
the domain of the web app.
I guess I could just use the EventInterop.dll directly rather than using the
wrapper API, or build my own wrapper class, but someone already did the work
and it looked like it would be simple to just use the download. We're busy
doing a lot of development, but this SMTP sink stuff is new to us so anything
to minimize the learning curve is helpful.
Anyhow, thanks for any help with this. Any advice on using the managed
wrapper, or alternately on any possible better approaches would be
appreciated.
Thanks,
Joel
"David A. Coursey" wrote:
> I know this might not make you feel any better, but here it is anyway.
>
> I have been working on a rather large Exchange Event Sink in C# for about 4
> months. During this time I have read just about every article that I could
> find online related to the subject -- including the one you posted. I found
> many discrepencies between the instructions on MSDN and real life.
>
> Which interop assemblies are you trying to compile? I may have some I can
> send you that work for me.
>
> Also, what exactly do you mean by "receive SMTP mail"? I assume the app is
> run on the exchange server. I have successfully made my event sink receive a
> new mail, examine all of its properties, process all attachments, modify
> headers and schema, change encoding, and still let the mail come out solid on
> the other side. Also, I never have had the need to use the propertybag.
>
> I am planning on writing an article or something on the subject, but who has
> time?
> anyhoo, feel free to reply with any questions or answers to my questions.
>
> dave
.
- References:
- repost: problem compiling Managed Sink Wrapper for SMTP
- From: Joel Aufgang
- RE: repost: problem compiling Managed Sink Wrapper for SMTP
- From: David A. Coursey
- repost: problem compiling Managed Sink Wrapper for SMTP
- Prev by Date: RE: Event sink + multithread support
- Next by Date: Grab the CC value and body from a Message Attachment
- Previous by thread: RE: repost: problem compiling Managed Sink Wrapper for SMTP
- Next by thread: Can´t overwrite SMTP event sink DLL
- Index(es):
Relevant Pages
|