I have been digging around the web and this site for many hours looking for a solution to my problem. I have found some scripts that come close or touch on parts of what I need. In theory what im trying to do seems simple but from what i can see it may be. I am hope to get some assistance for anyone willing to help.
- I receive emails from a ticketing system (many of them). I am required to acknowledge every ticket.
- the incoming email has allot of information but I only need one piece the “Incident ID:”
- this Incident ID is present in both the subject and the body I dont care where I pull it from
- the acceptance process is not done by replying but by clicking a “mailto” link in the email
looking at this link it is simple. it opens a new email and inputs a specific email address in the to field. adds the same generic one liner to the body. then it adds the words "Acknowledge Incident (IM####) where #### is the incident number.
I have seen plenty of example scripts that will create the email i need address the to field and fill the body even the subject. but my problem is how do I get that one unique incident ID at the end of the subject line.
I have explored a couple of option.
- if posible I would like a rule in mail.app to launch the applescript. when the email tickets arrive.
Unknown: can the script pull the Incident ID from the subject or body then create a new email and place the Incident Id in the correct place at the end of the subject line. then send it.
option two. Since there is a perfectly working "mailto"link in the original email. can an applescript pull that url. and launch it. opening an new mail window with all the proper information already filled then send it.
one more approve. may be over kill but I am up for anything.
somehow have the rule run the applescript that exports the body of the new email to a text file. then creates a new email and somehow reads the “incident ID” from the text file. then sends the email.
I know this is allot for a simple tasks. I get about 100 of these email a night. and if I dont respond to them within 10 minutes. higher ups get paged. and that looks bad on me.
Ideally I would like to leave my mac on and mail.app up and it does all this without any interaction from me.
Thanks in advance.
P.S. If this post is in the wrong place, I am sorry, Please direct me to the proper place.