Detecting sending of an email?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm maintaining a Ticket Writer application. I've been asked to do something
that requires me to know when a ticket is emailed. The emails are composed
from Access via Outlook and come up in Outlook to be reviewed before they are
sent. Is there any way the Access database can know if the email was actually
sent? Either by being notified directly by Outlook or by examining the
Outlook 'Sent' folder. Any help or tips appreciated. Here is some of the code
that puts out the emails:

Dim olObject As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolder As Outlook.MAPIFolder
Dim myItem As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
.....
Set olObject = CreateObject("Outlook.Application")
Set myNameSpace = olObject.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItem = olObject.CreateItem(olMailItem)
.....
myItem.Body = Msg
myItem.Display
AppActivate myItem.Subject
 
How about just sending it and requesting a read receipt?

myItem.Send
myItem.ReadReceiptRequested
 
I'm still left with the problem of how does my Access database get the
notification.
Presumably the read receipt will go to Outlook, not to Access. Essentially,
what I need to do is to notify the ticket agents of any tickets that have not
been emailed. The sending of the email is what matters really not the
delivery. For instance, if the receipient's mailbox is full that is not my
problem, the application has fulfilled its obligation by sending the email.
There are SLA's involved which carry monetary penalties. We have one hour
within ticket creation to send the email.
 
Back
Top