Need help here...
I got this code from another thread i would apreciate anybody giving a hand
When I set the variable cdoSendUsingPort = 25 as indicated in the original trhread i get an error message "Error 3749 Fields Update Failed. For further information , examine the Status property of individual field objects."
on the line where the Update is executed.
The curious thing is if i use port such as cdoSendUsingPort =2 i get an error where the Send command is executed which states something like "Server response not available".
Could someone enlighten me ????
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Const cdoSendUsingPort = 2
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds
.Item(" = cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item(" = "Server"
.Item(" = 10
.Update
End With
' Build HTML for message body.
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
' Apply the settings to the message.
With iMsg
Set .Configuration = iConf
.To = "test@test.com" 'ToDo: Enter a valid email address.
.From = "test@test.com" 'ToDo: Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
MsgBox "Mail Sent!"
I got this code from another thread i would apreciate anybody giving a hand
When I set the variable cdoSendUsingPort = 25 as indicated in the original trhread i get an error message "Error 3749 Fields Update Failed. For further information , examine the Status property of individual field objects."
on the line where the Update is executed.
The curious thing is if i use port such as cdoSendUsingPort =2 i get an error where the Send command is executed which states something like "Server response not available".
Could someone enlighten me ????
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Const cdoSendUsingPort = 2
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds
.Item(" = cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item(" = "Server"
.Item(" = 10
.Update
End With
' Build HTML for message body.
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
' Apply the settings to the message.
With iMsg
Set .Configuration = iConf
.To = "test@test.com" 'ToDo: Enter a valid email address.
.From = "test@test.com" 'ToDo: Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
MsgBox "Mail Sent!"