N
Nicholas Then
I am writing an outlook add-in that is a simple button using the Office XP interops. The user clicks it and the message forwards to a specified mailbox and then the origonal email is deleted. See below...
Dim oEmailMessage As Outlook.MailItem = CType(m_olApp.ActiveInspector.CurrentItem, Outlook.MailItem)
Dim oNewEmailMessage As Outlook.MailItem = oEmailMessage.Forward
oNewEmailMessage.DeleteAfterSubmit = True
oNewEmailMessage.To = "(e-mail address removed)"
oNewEmailMessage.Send()
oEmailMessage.Delete()
The add-in is used by our spam services so that employees can submit emails that our filters do not catch. Our spam software will then check this specified box and by using Bayesian analysis will add the patterns to its database. Pretty simple....however I have noticed some problems....when, lets say, I click on the add-in button and the message is forwarded to the server, the origonal history is now in the body of the message such as...
--------------------------------------------------------------------------------
From: Some User [mailto:[email protected]]
Sent: Monday, June 14, 2004 3:00 PM
To: Another User
Subject: RE: Blah Blah Blah
Is there a way that I can get the above text out of my email? It is messing up the filtering because company addresses are now getting added to the spam database...
I have tried oNewEmailMessage.Body = oEmailMessage.Body which does copy the body, but the formatting is way off, and the .ClearConversationIndex does not seem to remove anything. So basically is there a way that I can forward an email but not have it the text shown above to prevent my filters from logging data that should not be logged?
Finally I have placed this in another post but I don't know if it has posted or not... When I delete my origonal message using oEmailMessage.Delete() Outlook puts the message into the deleted items folder. Can I get outlook to permanently delete the message?
Thanks in advance...
Dim oEmailMessage As Outlook.MailItem = CType(m_olApp.ActiveInspector.CurrentItem, Outlook.MailItem)
Dim oNewEmailMessage As Outlook.MailItem = oEmailMessage.Forward
oNewEmailMessage.DeleteAfterSubmit = True
oNewEmailMessage.To = "(e-mail address removed)"
oNewEmailMessage.Send()
oEmailMessage.Delete()
The add-in is used by our spam services so that employees can submit emails that our filters do not catch. Our spam software will then check this specified box and by using Bayesian analysis will add the patterns to its database. Pretty simple....however I have noticed some problems....when, lets say, I click on the add-in button and the message is forwarded to the server, the origonal history is now in the body of the message such as...
--------------------------------------------------------------------------------
From: Some User [mailto:[email protected]]
Sent: Monday, June 14, 2004 3:00 PM
To: Another User
Subject: RE: Blah Blah Blah
Is there a way that I can get the above text out of my email? It is messing up the filtering because company addresses are now getting added to the spam database...
I have tried oNewEmailMessage.Body = oEmailMessage.Body which does copy the body, but the formatting is way off, and the .ClearConversationIndex does not seem to remove anything. So basically is there a way that I can forward an email but not have it the text shown above to prevent my filters from logging data that should not be logged?
Finally I have placed this in another post but I don't know if it has posted or not... When I delete my origonal message using oEmailMessage.Delete() Outlook puts the message into the deleted items folder. Can I get outlook to permanently delete the message?
Thanks in advance...