We help IT Professionals succeed at work.

Is it possible to use AspEmail (ASPEMAILLib) in a Windows Application? - I try but get an error

JorgenVester
JorgenVester asked
on
969 Views
Last Modified: 2008-01-09
Hey

I have used AspEmail for some years now and have succesfully tried to migrate from ASP to ASP.Net.
I have also used the component from a stored procedure in SQL Server without any problems.

Now I want to use it in a Windows Application.
I have a reference to ASPEMAILLib and I can initialize an object like this:

ASPEMAILLib.IMailSender _objMail = new ASPEMAILLib.MailSender();

But when I call _objMail .Send I get the following error:

System.AccessViolationException was caught
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
  Source="ASPEMAILLib"
  StackTrace:
       at ASPEMAILLib.MailSenderClass.Send(Object Path)
       at ATMailSender.frmMailSender.SendMailBatchForMailServer() in C:\Visual Studio 2005\Projects\ATMailSender\ATMailSender\frmMailSender.cs:line 137

Can anybody help?
Comment
Watch Question

Software Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
See this link
http://msdn2.microsoft.com/en-us/library/ms164911.aspx
This is a msdn article showing how to debug automatic exceptions
Hope this helps

Raja

Author

Commented:
Thank you

I have checked the SMTP support in .NET and will try this at first
But I am not sure that it will meet all my requirements.

I have now begun to check the market for components just in case.


Top Expert 2004

Commented:
jorgen:

I wrote an open source one some time ago that may save you a few bucks, its BSD license. It also includes such nicities as email validation and direct sending as opposed to relay

http://sourceforge.com/projects/no-cdo

Cheers,

Greg
You can also check OpenSmtp.Net:
        http://sourceforge.net/projects/opensmtp-net/
I think i am eligible for points since i have targeted the AccessViolationException  error.

Author

Commented:
I followed mnasmans recommendation and researched the SMTP support in .NET. So even though I ended up using the new System.Net.Mail which is much better than the old System.Web.Mail I think that the points must go to him. Than you for all other answers though.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.