I made this suggestion on another post, but you can use CDO to send the email. Thsi will allow you to place Multiple checks in the code.
Here is a small example of CDO
[tt]
Public Function IsUserOnline(ByRef LoginName As string, RyRef EmailSubject as String, RyRef EmailText as String) As Boolean
On Error GoTo ErrorHandler
Dim objSession As MAPI.Session
Dim objInfoStore
Dim objOutbox As Folder
Dim objNewMessage As Message
Dim objRecipients As Recipients
Dim objOneRecip As Recipient
If Not IsNull(objSession) Then
'This Line will see if the mail session is already
'open, if not it will open it. There is no use in
're-opening the mail program many times.
Set objSession = CreateObject("mapi.session"

objSession.Logon LoginName, "", False, False, 0
End If
'If the login failed then the Current User will not
'be the same as the user you tried to login with
If objSession.CurrentUser <> LoginName Then
isuseronlne = True
Exit Function
End If
'By looking for the Public Folder we can ensure that we
'have actually connected to Outlook
Set objInfoStore = objSession.InfoStores("Public Folders"

On Error Resume Next
IsUserOnline = objInfoStore.Fields(PR_STORE_OFFLINE).Value
If Err.Number <> 0 Or IsUserOnline <> 0 Then
'The PR_STORE_OFFLINE field may not exist,
'which indicates that the store is online.
IsUserOnline = False
End If
'Finally we can send our email
Set objOutbox = objSession.Outbox
Set objNewMessage = objOutbox.Messages.Add
Set objRecipients = objNewMessage.Recipients
Set objOneRecip = objRecipients.Add
With objOneRecip
.Name = LoginName
.Type = ActMsgTo
.Resolve showdialog = False
End With
With objNewMessage
.Subject = EmailSubject
.Text = EmailText
.Send
End With
Set objInfoStore = Nothing
Set objOutbox = Nothing
Set objNewMessage = Nothing
Set objRecipients = Nothing
Set objOneRecip = Nothing
Exit Function
ErrorHandler:
MsgBox "EMAIL ERROR " & err.Number & err.Description
End Function
[/tt]
Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!