I posted this some time ago but never really got to the bottom of the issue and just "lived with it" and put in an error message telling the user to re-start but I now really need to try and resolve the issue or at least understand why I have this Email failure
I have several DBs which work fine on most PCs (approx 15 users) I do however have a problem sending emails from some machines (using a macro OR in VBA to do the send object as example below)
The mail program used is Outlook 2000 / 2003
I have now DoCmd.SendObject , , acFormatTXT, mailTo, , ccTo, stSubject, stText, -1
This works fine allmost all machines running the DB as a mde front end, and can send a mail, then another etc etc but on a couple I get a fail message when attempting to send, this message is unspecific. I cannot find any different settings on the machines in question, the op system is 2000 / XP.
I operate the same program on my PC running XP prof servpk 2 and although 99% of the time the emails go through without issue I do sometimes have the same problem. Re-starting the Access DB will resolve it! but as my users have to go through logon process etc I would be great if there is some proceedure where I can re-set whatever is causing the hang
the full on-click is below:
Any thought or advise welcome.
Regards
Steve
--------------------------------------------------------------------------

Private Sub Command184_Click()
On Error GoTo Err_Command184_Click
Dim mailTo As Variant '-- Address's for SendObject
Dim ccTo As Variant '-- CC Address for SendObject
Dim stText As String '-- E-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stWho As String '-- Reference to Users
mailTo = "YY Cim Arrival Notification"
ccTo = "Site.com"
stWho = Username
stSubject = "*** Notification of Custom Status Truck Arrival on Site *** " & Date & " Our Ref:" & ref
stText = "Company" & Chr$(13) & _
Chr$(13) & BOOKREF & " FAO VAS Receiving T1, Vehicle Arrived at " & Format([ARRTIME], "hh:mm") & Chr$(13) & _
Chr$(13) & _
"Supplier. : " & SUPPLIER & Chr$(13) & _
"Carrier...: " & CARRIER & Chr$(13) & _
"Vehicle...: " & VEHICLE & Chr$(13) & _
"Driver....: " & Driver & Chr$(13) & _
"Trailer.. : " & TRLIDIN & ".. Bonded[" & mprint & "]..Time Booked: " & Format([BOOKTIME], "hh:mm") & _
Chr$(13) & _
"Comments..: " & Chr$(13) & _
Comments & Chr$(13) & _
Chr$(13) & _
"The above trailer / vehicle has arrived on site at " & Format([ARRTIME], "hh:mm") & " and the driver has been instructed to leave his" & _
" documents at the Security area in the red customs tray. " & _
"Please find the documents there in order to complete the Customs procedures and authorise the vehicles entry on to" & _
" site for offloading. Time Out: " & Format([TIMEOUT], "hh:mm") & Chr$(13) & _
Chr$(13) & Chr$(13) & _
"Completed by.: " & Username & " " & Now()
DoCmd.SendObject , , acFormatTXT, mailTo, , ccTo, stSubject, stText, -1
Exit_Command184_Click:
Exit Sub
Err_Command184_Click:
DoCmd.Beep
MsgBox "There Was A Problem Mail Not Sent, If the Problem Persists You May Need To Re-Start The Application"
Resume Exit_Command184_Click
I have several DBs which work fine on most PCs (approx 15 users) I do however have a problem sending emails from some machines (using a macro OR in VBA to do the send object as example below)
The mail program used is Outlook 2000 / 2003
I have now DoCmd.SendObject , , acFormatTXT, mailTo, , ccTo, stSubject, stText, -1
This works fine allmost all machines running the DB as a mde front end, and can send a mail, then another etc etc but on a couple I get a fail message when attempting to send, this message is unspecific. I cannot find any different settings on the machines in question, the op system is 2000 / XP.
I operate the same program on my PC running XP prof servpk 2 and although 99% of the time the emails go through without issue I do sometimes have the same problem. Re-starting the Access DB will resolve it! but as my users have to go through logon process etc I would be great if there is some proceedure where I can re-set whatever is causing the hang
the full on-click is below:
Any thought or advise welcome.
Regards
Steve
--------------------------------------------------------------------------
Private Sub Command184_Click()
On Error GoTo Err_Command184_Click
Dim mailTo As Variant '-- Address's for SendObject
Dim ccTo As Variant '-- CC Address for SendObject
Dim stText As String '-- E-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stWho As String '-- Reference to Users
mailTo = "YY Cim Arrival Notification"
ccTo = "Site.com"
stWho = Username
stSubject = "*** Notification of Custom Status Truck Arrival on Site *** " & Date & " Our Ref:" & ref
stText = "Company" & Chr$(13) & _
Chr$(13) & BOOKREF & " FAO VAS Receiving T1, Vehicle Arrived at " & Format([ARRTIME], "hh:mm") & Chr$(13) & _
Chr$(13) & _
"Supplier. : " & SUPPLIER & Chr$(13) & _
"Carrier...: " & CARRIER & Chr$(13) & _
"Vehicle...: " & VEHICLE & Chr$(13) & _
"Driver....: " & Driver & Chr$(13) & _
"Trailer.. : " & TRLIDIN & ".. Bonded[" & mprint & "]..Time Booked: " & Format([BOOKTIME], "hh:mm") & _
Chr$(13) & _
"Comments..: " & Chr$(13) & _
Comments & Chr$(13) & _
Chr$(13) & _
"The above trailer / vehicle has arrived on site at " & Format([ARRTIME], "hh:mm") & " and the driver has been instructed to leave his" & _
" documents at the Security area in the red customs tray. " & _
"Please find the documents there in order to complete the Customs procedures and authorise the vehicles entry on to" & _
" site for offloading. Time Out: " & Format([TIMEOUT], "hh:mm") & Chr$(13) & _
Chr$(13) & Chr$(13) & _
"Completed by.: " & Username & " " & Now()
DoCmd.SendObject , , acFormatTXT, mailTo, , ccTo, stSubject, stText, -1
Exit_Command184_Click:
Exit Sub
Err_Command184_Click:
DoCmd.Beep
MsgBox "There Was A Problem Mail Not Sent, If the Problem Persists You May Need To Re-Start The Application"
Resume Exit_Command184_Click