CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • CDO.Message.1 error '80040605' Unknown Error

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    210
  • Date Created
    Monday, November 30, 2015
  • Last Updated
    Monday, November 30, 2015
  • This Article Has been Viewed
    2912 times
  • Short Desc
    CDO.Message.1 error '80040605' Unknown Error occurs when the HTMLBody is the first line of the code. In earlier versions of IIS, then was possible to run, however, with IIS8 and Above, there seems to be a change, that stops this from working properly.
  • Details
    Sometime when using CDOSYS to send email, you may run up on the following error.


     
    CDO.Message.1 error '80040605'

    Unknown Error

    /Contact/mail.asp, line 62[/codevalue]
  • Recreate Issue
    To reproduce this error.

    <%
    myMail.To = "webmaster@domain.com"
    myMail.Subject = "This is your subject"
    myMail.From = "Visitor@Email.com"

    myMail.HTMLBody = "<strong>this is your first line here</strong>" '1st line
    myMail.HTMLBody = myMail.HTMLBody &"This is your second line" '2nd line
    myMail.Send[/Codewrap]

    As you can see in the above code, the 1st line is causing the error.
    Though we have been using the code this way for years, it seems that Microsoft has changed something, to where this will not longer function the way that it was or has in the past.
  • Resolve Issue
    To resolve this issue:

    <%

    myMail.To = "webmaster@domain.com"
    myMail.Subject = "This is your subject"
    myMail.From = "Visitor@Email.com"

    myMail.TextBody = "" '1st line
    myMail.HTMLBody = myMail.HTMLBody &"<strong>this is your first line here</strong>" '2nd line
    myMail.HTMLBody = myMail.HTMLBody &"This is your second line" '3rd line
    myMail.Send
    [/Codewrap]

    Looking at the 1st line now, you can see how we changed it from HTMLbody[/codesource] to TextBody[/codesource]. And we changed the original 1st line, to have the double HTMLBody, for the additional rows. This will allow the code to run properly now.

    I assume that this it suppose to be, send text based emails, in case HTML Base email is not allowed or supported.