T
tom
I would like to send a message upon hitting the submit button, but I keep
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
..Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"
..Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
strbody = MessageText
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.From = """me""(e-mail address removed)"
.Subject = "test"
.TextBody = strbody
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
getting an error message of "the transport failed to connect to the server".
I am connected to the Internet, and do not use out look. Can someone please
help. I have the following code that has already been posted with a few
changes:
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
MessageText = MessageSender.MessageBox
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
..Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"username"
..Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"password"
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.noblephones.com"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
strbody = MessageText
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.From = """me""(e-mail address removed)"
.Subject = "test"
.TextBody = strbody
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub