•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 402,448 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,033 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 7602 | Replies: 0
![]() |
•
•
Join Date: Apr 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I am getting an error message
"The trasport failed to connect to the server."
I know why I am getting the error, our mail server is having technical problems and won't let anyone connect to send or retrieve emails periodically. My question is, how do I go about queing these suckers until I can successfully connect, or are they just lost? Below is the code to do this:
Set objConfig = CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "SMTP Server"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "userid"
.Item(cdoSendPassword) = "password"
.Update
End With
Set objMessage = CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "User Account Sending To"
.From = "User Account Sending From"
.Subject = "Subject"
.TextBody = "mailbody"
.Send
End With
GoTo CloseEverything
ErrorHandler:
' Something
CloseEverything:
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
Thanks for Any and All Help!!
"The trasport failed to connect to the server."
I know why I am getting the error, our mail server is having technical problems and won't let anyone connect to send or retrieve emails periodically. My question is, how do I go about queing these suckers until I can successfully connect, or are they just lost? Below is the code to do this:
Set objConfig = CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "SMTP Server"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "userid"
.Item(cdoSendPassword) = "password"
.Update
End With
Set objMessage = CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = "User Account Sending To"
.From = "User Account Sending From"
.Subject = "Subject"
.TextBody = "mailbody"
.Send
End With
GoTo CloseEverything
ErrorHandler:
' Something
CloseEverything:
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
Thanks for Any and All Help!!
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Why am I getting constant popups on this site? (Techies' Lounge)
- atmclk.exe virus help? (Viruses, Spyware and other Nasties)
- New layout issues (DaniWeb Community Feedback)
- windows messanger wont stop starting on startup (Windows NT / 2000 / XP / 2003)
- wlan with dial-up (Windows NT / 2000 / XP / 2003)
- Multi Media Flash Problems (Windows NT / 2000 / XP / 2003)
Other Threads in the VB.NET Forum
- Previous Thread: VB .net vs VS .net
- Next Thread: printing stored pictures


Linear Mode