Need URL from email body in background processing

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
obfusc88
Pro Scripter
Posts: 87
Joined: Wed Mar 14, 2007 6:22 pm

Need URL from email body in background processing

Post by obfusc88 » Tue Nov 23, 2010 2:08 am

I need to RegEx parse some values, primarily URL data, out of the body of some emails. I do not want to open the email client, but want to process this in the background. I am using Mozilla Thunderbird to download email from an AOL account using WebMail AddOn.

I have a filter in Thunderbird that moves the appropriate messages to a separate folder. The filter actions do not allow to copy to a file, or print, only copy/move to other folders. At the AOL front end, AOL has the same filter action limits, folder movements only. So I can't do this at the front end before I receive it on the local computer.

I have located the local PC email folder and file. I can move to the correct section of the file and get the latest messages, but the body section is encrypted, so parsing this file will not work.

I have no control over the format from the sender, else I would have them include the URL in the Subject line.

Once I have the URL I will be able to HTTPGet and do additional RegEX extraction of other data elements not in the email body.

Any suggestions on how I can do a background process to send the email message to a text/html file where I can process it with RegEx tools? Don't even care if I don't have to have a file, really need to get the URL out of the body, and this seemed like the best approach. Any other ideas are welcome.

obfusc88
Pro Scripter
Posts: 87
Joined: Wed Mar 14, 2007 6:22 pm

Post by obfusc88 » Tue Nov 23, 2010 2:51 am

Other things I recently tried:

Looked for Thunderbird AddOns to Save Emails or send to Lightning Calendar, no AddOns found to do that.

In AOL, tried to forward to C:\Temp\filename, but system rejected as invalid address.

Tried to forward to C:\Temp\[email protected], but system rejected as invalid address.

Tried both the above in the Thunderbird filter actions with same results. Not surprised, but trying to think outside the box.....

-------------------
If anyone knows of an email client that allows filters to Save As or Print, that would probably work. A command line tool would even be a greater enhancement. Am looking at The Bat!, but $45.00 is steep price to pay for just this feature. I have also learned that Eudora may have this feature, can anyone confirm that?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Nov 23, 2010 5:12 am

I am not familiar with The Bat, but here is some info about Eudora.

It is in the process of being rewritten based on Thunderbird. If you download the latest version, it will be version OSE1.0 and the Filter options are the same as Thunderbird, so you still will not have a save option.

But if you search for the older version 7.1.0.9, the Filter actions in that version do have a Print option. So you could set up a printer to print to a file, and use that option to get a copy of the email.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Nov 23, 2010 6:52 pm

I got a chance to make and test a filter to Print in Eudora. Worked OK but no way to provide a default destination, you get prompted to enter the path and filename, then may have a few windows to close. Since the email client has to be open for the filters to work anyway, then it should be easy enough to make a Macro Scheduler script to provide the filename and close the windows. It could be triggered on WindowOpen for Window="Print to File".

OnEvent>WINDOW_OPEN,Print to File*,2,FillPrintDestination

Not totally done in the background, but that seems to be the options if you use Eudora.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

obfusc88
Pro Scripter
Posts: 87
Joined: Wed Mar 14, 2007 6:22 pm

Post by obfusc88 » Wed Nov 24, 2010 9:44 pm

Thank you Bob for the info about Eudora.

I have downloaded The Bat! and hope to try that over the weekend. I have also made a request to Mozilla to add SaveAs and Print as filters to version 4 of Thunderbird.

Not sure what I will do yet, but Macro Scheduler will make it all happen.

GarryP
Junior Coder
Posts: 27
Joined: Sat Feb 04, 2006 12:01 pm

Post by GarryP » Tue Dec 07, 2010 2:04 am

After lots and lots of looking, I have found a way to send and/or receive SSL emails from MSP with a couple of open source utilities. Let me know if you are still looking and I will give the solution I am using.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts