(DNN version 3.22, Windows XP fully patched)
I'm having trouble sending emails in Html format. Everything works great if it's text format, but when I change it to Html I get the dreaded "Could not access 'CDO.Message' object." message.
To eliminate any of my code here's the tests I've performed:
Test 1: Send a test email using the "test" function in the SMTP Server Settings on the Host Settings page. It works great. I've tried it with the SMTP fields blank and with Server, Username, Password. Works great either way.
Test 2: Send a test email using the same method, except modify the Mail.vb so that the objBodyFormat = Mail.Format.Html. It fails.
Why does it work in "Text" format but not in "Html" format???
------------
Here's the full error message as recorded in the log:
Could not access 'CDO.Message' object.
Message: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040605): Unknown Error --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.SetProp(Type type, Object obj, String propName, Object propValue) at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj, String propName, Object propValue) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, String Attachment, String SMTPServer, String SMTPAuthentication, String SMTPUsername, String SMTPPassword) in C:\WorkInProgress\eGovPay2_DNN322\components\Mail\Mail.vb:line 169