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.
Swi
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