We are converting our systems from old cdo messaging to use wwSMTP with Office365. Everything is working wonderfully with one exception. We have some automated reports that read generated html files and issue oCDO.CreateMHTMLBody() to read in the file. This embeds the html into the message.
I have tried running a simple filetostr() of the .htm file, but get errors from the message object of invalid characters. Is there an equivalent method to send html as .CreateMHTMLBody?
I will work up a sample .htm file if that would be helpful.
Thanks!
I think when I did this in Exchange there was a setting to use HTML email body by default. However, I was automating Outlook directly to generate my emails, not using SMTP at tlhe time. Could there be an Exchange server setting impacting the HTML body? hmmm.
FYI, I am looking for work. See my job post in this message board: https://support.west-wind.com/Thread6D40VDOKO.wwt
You should be able to use HTML for your messages. If you're reading the data from file, what are you actually getting? You should examine the file and make sure it's not in some funky encoding - if you're getting an error for invlaid characters it's likely low ascii characters (Chr(0)) which would indiciate that the file is perhaps encoded as Unicode and you need to decode it first.
+++ Rick ---
Thanks for the info, Rick. Turns out that apparently we had a comma at the end of our bcc list, which was throwing off things.
The message returned from O365 was: "An invalid character was found in the mail header: '"'."
Once that comma was removed, everything started working, including all our old html code from the file <whew!>
We are fighting a few workstations not wanting to load wwDotNetBridge.dll. I'll start a new thread if we can't get past that, but so far this is a great solution for our system to replace our ancient CDO object - thanks!