This would seem to be a fairly basic question, but I can’t find an answer anywhere.
I have a big mailing list with a lot of bad e-mail addresses. When e-mail notices come back from “Daemon” I want to save them all in one folder as text files and then extract the original e-mail addresses and compile them into a list which I can then use to compare to the email addresses in the (Filemaker Pro) database.
My problem is that I can’t figure out how to make an Applescript that will identify and extract (get) an email address from a text file such as TextEdit or MS Word.
Once I have solved that basic problem, I will have to figure out how to tell the script which e-mail address to extract. I can do this in Filemaker, but it seems that it would be easier to do it in Applescript with a droplet.
[Note: the way these Daemon notices are set up, the heading with "From: ", "To: ", and, "Subject: " is repeated, first with the recipient’s information and then with the information from your original email. Thus you only have to find the email address that occurrs after the second iteration of the string "To: " – So, the first iteration would be “To: myE-mail@myDomain.com” and the second would be "To: Barney.Google@lalaland.com.]