I built a C# assembly that contains functionality to send mail messages. I have done this several ways in C# before no problem. But this time I am getting an error with sending the actual message.
Stack trace:
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText)
at ddp.ddpIntMail.sendmail()
so I call the Send() method, with either a MailMessage, or with the full argument list, and from deep in the bowels of the framework I get the
"Could not access 'CDO.Message' object" exception.
So my question: Where is the security setting that I need to loosen to allow smptmail to work again?
I have tried elevating the trust level of the assembly in the Assembly Cache Manager. Yes, I do reference the System.Web.Mail namespace. Is it due to the fact that this is running inside a DLL, and smtp is set to only allow Admins? Once this works, I am going to be spinning off a thread so as to process in an async fashion, allowing large amounts of mail to be sent without halting app execution.
Anyway, I could really use some help, I am kinda baffled here. Thanks
Stack trace:
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText)
at ddp.ddpIntMail.sendmail()
so I call the Send() method, with either a MailMessage, or with the full argument list, and from deep in the bowels of the framework I get the
"Could not access 'CDO.Message' object" exception.
So my question: Where is the security setting that I need to loosen to allow smptmail to work again?
I have tried elevating the trust level of the assembly in the Assembly Cache Manager. Yes, I do reference the System.Web.Mail namespace. Is it due to the fact that this is running inside a DLL, and smtp is set to only allow Admins? Once this works, I am going to be spinning off a thread so as to process in an async fashion, allowing large amounts of mail to be sent without halting app execution.
Anyway, I could really use some help, I am kinda baffled here. Thanks