B
Brad Pears
I am using the CDO object to send email automatically from an Access 2000
application. It has been working flawlessly until just recently, when users
have been experiencing a "transport unavailable" message.
After doing some debugging, I discovered that the strSch variable which I
set to "http://schemas.microsoft.com/cdo/configuration" is unavailable if
you attempt to go to this location using your web browser...
I can get as far as schemas.microsoft.com and that is it....
I am not sure that this is the issue but I believe that this site must be
available in order for the CDO object to work. Can someone confirm if this
has been a recent problem and what the new site might be if it has moved?
Thanks
Brad
PS... Here is a sample of the code which uses the CDO object to send email
which I said earlier has been working flawlessly for almost a year...
--------------------------------------------------------------------------------------------------------------
Public Sub SendEmail(strTo As String, strSubject As String, strBody As
String)
On Error GoTo Error_Handler
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "true3"
'Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "user"
.Item(strSch & "sendpassword") = "password"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.From = getEmailAddress(CurrentUser())
.Sender = getEmailAddress(CurrentUser())
.To = strTo
.Subject = strSubject
.TextBody = strBody
'.HTMLBody = "This is not Bold But <B>This is!</B>"
.Send
End With
' Exit and cleanup
MsgBox "Email successfully sent to " & strTo
Exit_Here:
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
End Sub
application. It has been working flawlessly until just recently, when users
have been experiencing a "transport unavailable" message.
After doing some debugging, I discovered that the strSch variable which I
set to "http://schemas.microsoft.com/cdo/configuration" is unavailable if
you attempt to go to this location using your web browser...
I can get as far as schemas.microsoft.com and that is it....
I am not sure that this is the issue but I believe that this site must be
available in order for the CDO object to work. Can someone confirm if this
has been a recent problem and what the new site might be if it has moved?
Thanks
Brad
PS... Here is a sample of the code which uses the CDO object to send email
which I said earlier has been working flawlessly for almost a year...
--------------------------------------------------------------------------------------------------------------
Public Sub SendEmail(strTo As String, strSubject As String, strBody As
String)
On Error GoTo Error_Handler
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "true3"
'Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "user"
.Item(strSch & "sendpassword") = "password"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.From = getEmailAddress(CurrentUser())
.Sender = getEmailAddress(CurrentUser())
.To = strTo
.Subject = strSubject
.TextBody = strBody
'.HTMLBody = "This is not Bold But <B>This is!</B>"
.Send
End With
' Exit and cleanup
MsgBox "Email successfully sent to " & strTo
Exit_Here:
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
End Sub