Link to home
Start Free TrialLog in
Avatar of WINBRO
WINBROFlag for Cyprus

asked on

How to delete Specific email from Sent Items of Outlook for specific users with Exchange

We have an exchanger server 2007+ and outlook 2007 and we are trying to find a way to delete from the sent items folder specific sent emails not all sent items folder and also do this for specific users.

Is there a way to do this action by creating a rule or something?
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Sounds like you got something to hide and would be a bad thing to do to me.
Avatar of WINBRO

ASKER

yes i dont want the users to see an auto generated email. We are sending an email for a program that has credentials for the client and the users should not see it.

We made something like a another email for the user have them send it automatically with the sender being that email and the receiver the client. But the problem is that it is show in the users sent items.

So i was asking this to detect a token in the subject and everytime it sees it in the sent iteems the exchange server and outloook will delete it permanttly from the sent items folder.

IS that possible?
Avatar of Jamie McKillop
Hello,

You can use the Export-Mialbox command to search for and delete specific emails from mailboxes.

http://technet.microsoft.com/en-us/library/bb266964(EXCHG.80).aspx

JJ
Avatar of WINBRO

ASKER

i need to do this automatically and instantly.  Can i do this and have it run automatically? that means once the email in the sent items folder appears , the to auto detect it from the subject and then delete it or move it to another mailbox . Does it do that?
Avatar of WINBRO

ASKER

Also sorry for the double post i need not to delete or move a folder but specific items in the folder of the sent items folder
You won't be able to have the email deleted instantly. The only way to do that would be to write an Exchange event sink, which would require programming knowledge on how to do so.

You could setup a powershell script to run the export-mailbox command in a continuous loop but depending on how many mailboxes you have, it could take minutes to complete each loop.

JJ
Avatar of WINBRO

ASKER

So the only way to do this is with a powershall or event sink. this could also slow down the system, right? i think its not the best option.
I'm not aware of any other way to do what you want. Running the powershell script should have minimal impact of the performance of the Exchange server.

JJ
Avatar of WINBRO

ASKER

i will have to find a way to right the powershell and put it in exchange because i am not really good at scripting.

Thank you.
Avatar of WINBRO

ASKER

if any guidence can be shown to me it will be a good help. Thank you
First, you ned to determine what to search for. Does the message have the same subject each time? Is there any other unique characteristic about the message that is common to each one? Do you want any instance of the message deleted or just deleted from certain users?

JJ
Avatar of WINBRO

ASKER

The subject of the email is unique except of the end that has a number.so its partly unique.

the email itself in the body contains the same thing with four words changing for crendential informations.


I want to delete all the messages with a specific type of subject that contains e.g. FFGGLL to be deleted from certain users of the company.


Thank you . If more information is needed i will be happy to provide you with...
It would be easier to write a script that would delete any email with the subject from any mailbox. So, to confirm, there are mailboxes you do not want this email removed from?

JJ
Why not just have another mailbox that these go from instead of the users mailbox?
Avatar of WINBRO

ASKER

No i was confusing . I want this email that is in the sent items folder to be deleted from everybody. It just only a number of users get this in their sent items folder.

we have created another mailbox for this thing but because the user sends it through another program as a user it is caught by outlook but we manage to change the from field to be directed to another mailbox so the client doesnt see it is coming from a user but from a department. The problem is that we dont want the user to have this in his sent items as it is shown
How does it get into the USERS sent items folder? This extenal app uses the users local outlook profile to send on behalf of another user?
ASKER CERTIFIED SOLUTION
Avatar of Jamie McKillop
Jamie McKillop
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WINBRO

ASKER

we are using MS Dynamics CRM 2011 to send auto emails to the clients. The CRM is user based and it connects with Outlook to sent the emails. The email goes ok and managed to change the from field that the client gets with  another email by creating a rule on the exchange server for outgoing emails  from the organization to the clients. But the emails that are sent stay in the Sent Items folder. So that is why i want to find a way to delete the emails from the sent items folder with a specific word in the subject automatically. That means to auto detect the emails after the email is sent and then delete it permantly and not to  have it in the sent items folder in outlook.
Avatar of WINBRO

ASKER

Hi JJ ,

Does this command delete the email before it is sent to the client or it deletes it after it is sent in the sent items folder?
It will delete it after it is sent.

JJ
Avatar of WINBRO

ASKER

Ok i will try it and let you know. It may take until monday to give you an answwer because the IT is out of the office and he is in charge of the exchange server to put the script in there.

Thank you. I keep you posted.