System.Web.Mail namespace problem, not having IBodyParts interface

B

Brajesh Jain

Hi,

we are porting an existing VB/COM application on .NET. This
application is typically a mailing engine. For sending mails it uses
CDO. As part of development in .NET we are using System.Web.Mail
namespace.

Mails can have attachments also of different types as word files, html
files etc. But there is a case when a previously sent mail need to
send as attachment in the new mail, means attachment type is an
Outlook item. For this existing application uses IBodyPart interface
and function SaveToObject, but THERE IS NO CORRESPONDING FUNCTION OR
CLASSES in .NET library, and we dont want to use COM interop to use
CDO library.

Is there any possible way to do that, without using any COM libraries.

Thanks in advance
Brajesh Jain
 
N

Nicholas Paldino [.NET/C# MVP]

Brajesh,

Unfortunately, no, there is not. Any wrapper to the CDO library is
going to use COM interop beneath the sheets.

Do you not want to do this because it would force you to turn ASPCompat
on? If this is the case, you can offload the work that does COM interop
onto another thread where you set the apartment state to what you need it to
be. That way, you won't kill the performance of any ASP.NET worker threads.

Hope this helps.
 
C

Chad Z. Hower aka Kudzu

(e-mail address removed) (Brajesh Jain) wrote in
and function SaveToObject, but THERE IS NO CORRESPONDING FUNCTION OR
CLASSES in .NET library, and we dont want to use COM interop to use
CDO library.

Is there any possible way to do that, without using any COM libraries.

Try Indy. Its .NET and free.

www.indyproject.org

VB mail demo at:
www.atozed.com/indy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top