Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO

Status
Not open for further replies.

Swi

Programmer
Feb 4, 2002
1,963
US
I am using the following code to try to send emails from my VB6 app but I keep getting Run-time error '2147220975 (80040211)'

The message could not be sent to the SMTP server. The transport error code was 0x800ccc79.

I have used this code before with no issues. Am I missing something? Thanks in advance for any help on this.

Code:
Private Sub SendEmail(strSubject As String, _
                      strRecipient As String, _
                      strSender As String, _
                      strBodyText As String)
    Dim lobj_cdomsg As CDO.Message
    Set lobj_cdomsg = New CDO.Message
    lobj_cdomsg.Configuration.Fields(cdoSMTPServer) = "mail.xxxxxxprinting.com"
    lobj_cdomsg.Configuration.Fields(cdoSMTPServerPort) = 25
    lobj_cdomsg.Configuration.Fields(cdoSMTPConnectionTimeout) = 30
    lobj_cdomsg.Configuration.Fields(cdoSendUsingMethod) = cdoSendUsingPort
    lobj_cdomsg.Configuration.Fields.Update
    lobj_cdomsg.To = strRecipient
    lobj_cdomsg.From = strSender
    lobj_cdomsg.Subject = strSubject
    lobj_cdomsg.HTMLBody = strBodyText
    lobj_cdomsg.Send
    Set lobj_cdomsg = Nothing
End Sub

Swi
 
0x800CCC79 IXP_E_SMTP_REJECTED_RECIPIENTS Server rejected recipients

The server you are sending to is rejecting your recipient for some reason
 
Very strange. I changed the email addresses to ones I know are valid. I guess I need to talk with my network/email administrator? Thanks.

Swi
 
strongm,

I talked to another developer at my company and he said that my above code will not work because we do not have a relay SMTP server.

He said that to resolve this he always uses CDONTS. I tried installing the cdonts.dll and registering it but my system still does not see the newly registered DLL. I get the error:

Run-time error '429':
ActiveX component can't create object

I have never had this many issues trying to send a simple email before.



Swi
 
CDONTS is a front-end for IIS SMTP Mail and/or Exchange Mail. It cannot send mail without using one of these servers as an intermediary. There is more to it than a single DLL as well.

It is also considered obsolete, and was only included in Windows 2000 for compatibility with NT 4.0 applications.

Installing CDO for NTS
 
It was not my code all along. It was McAfee. I can't stand that virus protection. I had the same problem 5 years ago.

Swi
 
>It was McAfee

I would normally have suggested that your AV might have been the cause, but since you'd said that you used this code before with no issues I foolishly assumed that it wasn't your PC that was the issue.

>I can't stand that virus protection

It's just doing its job ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top