I have been using the below VB6 code to send emails every 30 minutes, program running continuously. Code has been very successful when transmitting emails connected to a land based LAN. When sending via a satellite based comms link (where comms speeds are noticeably slower), the SW can lock up in the “.SEND” process. Occurs about once a day. Have to use TaskManager to completely shutdown program before restarting.
Any suggestions to prevent or exit from the problem?Code:On Error GoTo cAppMsg_SendEmailError With cdoConf.Fields .item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Email.SMTPserver .item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 .item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False If (Email.Username = "") Then .item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0 Else .item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Email.Password .item("http://schemas.microsoft.com/cdo/configuration/sendusername") = Email.Username End If .Update End With With cdoMsg Set .Configuration = cdoConf .To = Email.ToAddress .from = Email.fromAddress .Subject = Email.Subject .TextBody = strBody .BCC = "" .CC = "" .Send End With Set cdoMsg = Nothing Set cdoConf = Nothing
Thks for yr help.




Reply With Quote