Solved

windows script outlook 2010

Posted on 2013-02-01
3
324 Views
Last Modified: 2013-02-05
I am NEW to scripting, meaning I have started learning from the scripting guys website. So I know next to NOTHING.
I would like to attempt to make a script thinking that if I have something in mind that i want to happen, it would be easier to make the script.
so for outlook 2010, i get delivery receipts ( I get these voluntarily, I want the receipts ) and I thought it would be nice to have something periodically go into my inbox and delete the delivery receipts.
Would this be a ridiculously ambitious script for a know nothing like me to attempt?
0
Comment
Question by:JeffBeall
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
atsvirginia earned 500 total points
ID: 38844971
This may work:

#!/bin/bash
# rm_mssg.sh user subject

if [ -z "$2" ]; then
 echo "usage:  rm_message.sh <fromuser_name> <subject>"
 echo "  Rummages through all mail boxes looking for messages from <fromuser_name> with subject=<subject>"
 echo "  Example: ./rm_mssg.sh butthead_user rems "
 echo "  Put double-quotes around multi-word subjects"
 exit 0
else
 addr=$1
 subject=$2

 for usractnopac in `zmprov gaa`
  do
   echo "Searching $usractnopac  for Subject:  $subject From: $addr"
   for msg in `zmmailbox -z -m "$usractnopac" s -l 999 -t message "from:$addr subject:$subject"|awk '{ if (NR!=1) {print}}' |
      grep -v -e Id -e "-" -e "^$" | awk '{ print $2 }'`
      do
        echo "Removing "$msg""
        zmmailbox -z -m $usractnopac dm $msg
      done
   done
fi

http://www.zimbra.com/forums/administrators/36646-contrib-how-delete-emails-based-subject-script.html
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 38845000
Thank you atsvirginia - but I was just wondering if this would be crazy hard. I thought if I attempted making the script, that would be a good way to learn. But it wouldn't be a good way if it was something that would require someone with more advanced knowledge.
I don't want to sound ungrateful, but I didn't want someone to make the script for me, because I wouldn't learn that way.
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 38855903
Thank you for your help.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question