The "Send Using" Configuration is invalid - TechRepublic
Question
December 24, 2010 at 06:19 AM
venkatnori

The “Send Using” Configuration is invalid

by venkatnori . Updated 15 years, 6 months ago

Hi

I’ve Windows 2008 Server OS on my server and SQL Server 2005 St. Edition. I’m using one VB6 Application which sends mail, it worked fine on win 2003 svr & sql 2005 combination. But recently I’ve changed the server to win 2008 ans sql 2005. Now, when I’m testing this application it’s not working.

This is the code

Public Sub SendOutlookMail(Subject As String, Recipient As String, Message As Variant)

Dim iMsg
‘ Dim iConf
‘ Dim Flds
Dim strHTML

On Error GoTo ErrHdlr

Const cdoSendUsingPort = 2

Set iMsg = CreateObject(“CDO.Message”)

‘ Build HTML for message body.
strHTML = “”
strHTML = strHTML & “”
strHTML = strHTML & “”
strHTML = strHTML & “ This is the test HTML message body

strHTML = strHTML & “”
strHTML = strHTML & “”

‘ Apply the settings to the message.
With iMsg
.To = “Recipient@xyz.com” ‘Recipient ‘ToDo: Enter a valid email address.
.From = “sender@xyz.com” ‘ToDo: Enter a valid email address.
.Subject = Subject ‘ “This is a test CDOSYS message (Sent via Port 25)”
.HTMLBody = Message ‘strHTML
.Send
End With

‘ Clean up variables.
Set iMsg = Nothing
‘ Set iConf = Nothing
‘ Set Flds = Nothing

‘MsgBox “Mail Sent!”
Exit Sub

ErrHdlr:

Exit Sub
End Sub

Can anyone help me please.

This discussion is locked

All Comments