Sub MailError(strUserInfo As String, _
strErrorInfo As String)
Dim objCurrentMessage As Outlook.MailItem
Dim objNamespace As Outlook.NameSpace
Dim objMessage As Outlook.MAPIFolder
Set objNamespace = GetOutlook()
Set objMessage = objNamespace.GetDefaultFolder(olFolderOutbox)
With objMessage.Items.Add(olMailItem)
.To = "guru@somecompany.com"
.Subject = strUserInfo
.Body = strErrorInfo
.Save
End With
End Sub
|