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:
  • CDOSYS (0x80040211) when username and password are used

  • 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:
    22
  • Date Created
    Tuesday, October 5, 2010
  • Last Updated
    Tuesday, October 5, 2010
  • This Article Has been Viewed
    3286 times
  • Short Desc
    When using the CDOSYS component to send email through your site, make sure that your username and password are accurate
  • Details
    When your hosting provider sets the email server to authenticate, you will have to set the username and password in your code.
    Make sure that you provide the correct credentials for your cdosys script to work properly
  • Recreate Issue
    If you provide incorrect credentials for the account, this error will happen

    <%
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="webmaster@domain.com"
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="wRoNgPaSsWoRd"
    %>


    As you can see above, the sendpassword="" is wrong. This will cause the error to happen.
  • Resolve Issue
    Make sure that you have the correct credentials for your account in order for this to work.
    sendusername (Email address)
    sendpassword (Password)

    <%
    Set myMail = CreateObject("CDO.Message")

    'This section provides the configuration information for the remote SMTP server.

    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.domain.com"
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

    ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="webmaster@domain.com"
    myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="12345678"

    myMail.Configuration.Fields.Update

    myMail.To = "someone@domain.com"
    myMail.Subject = "This is my subject"
    myMail.From = "webmaster@domain.com"
    myMail.HTMLBody = "This is a message to you about something that you requested!"
    myMail.Send
    %>