A
Alain
Hi,
I am trying to figure out why I get the following error when I try to send
a mail from an ASP.NET (1.1) application. When I use the same code from a
Windows exe then the code works perfectly, so I suppose that is has something
to do with security settings for IIS or SMTP Server.
Can anybody help me, because I am getting desperate. I have also looked it
up on the web but I get a lot of stuff that I have tried but none of the
solutions helped.
Code:
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send("(e-mail address removed)", "(e-mail address removed)", "Test", "Test");
Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoundType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstance() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject,
String messageText) at
System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String
messageText) at
Test.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\projects\test\webform1.aspx.cs:line 28
I am trying to figure out why I get the following error when I try to send
a mail from an ASP.NET (1.1) application. When I use the same code from a
Windows exe then the code works perfectly, so I suppose that is has something
to do with security settings for IIS or SMTP Server.
Can anybody help me, because I am getting desperate. I have also looked it
up on the web but I get a lot of stuff that I have tried but none of the
solutions helped.
Code:
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send("(e-mail address removed)", "(e-mail address removed)", "Test", "Test");
Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoundType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstance() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject,
String messageText) at
System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String
messageText) at
Test.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\projects\test\webform1.aspx.cs:line 28