RE: repost: problem compiling Managed Sink Wrapper for SMTP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: Cannot send any outgoing email
    ... mail server*, check the box for My server requires authentication. ... before you download a Windows ... SMTP emails. ... (I have downloaded so many XP updates that the original XP ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • SBS 2003 and ISP email
    ... My internal domain namespace is ... I have configured the pop3 connector to download email ... When I send an email thorugh my server ... There was a SMTP communication problem with the recipient's email ...
    (microsoft.public.windows.server.sbs)
  • Re: POP3 Gateway Mail Disappears After Download
    ... If that happens, you can get multiple instances of the connector trying to download mail, and that *really* makes a mess. ... POP3 is not the better option, but for use SMTP, I have another server to administrate in my structure. ... You just change the MX record in your public domain DNS zone to point to the hostname associated with the public IP of your SBS. ...
    (microsoft.public.backoffice.smallbiz)
  • Re: Third Party e-mail providers and Smart Host
    ... SMTP VS does not download email per se, ... Did the third party give you instructions on how to setup your mail server for Smarthosting to them using Exchange Server? ...
    (microsoft.public.exchange.connectivity)
  • RE: Exchange problem?
    ... The form on the website...what mailserver is it supposed to use to send ... Is it using SMTP? ... be using SMTP on the Small Business Server, ... Stop and start SMTP and then test the web app. ...
    (microsoft.public.windows.server.sbs)