What is the best way to programmatically extract text from an email from a additional inbox? - email

I recently started working at an IT company as a support agent and one of the things we do is managing the backup of our clients' servers.
It's all working nicely, but one part is just terrible, which is the backup log. The backup log is a excel file with a list of all the clients and for each of them a list of dates and whether or not the backup has succeeded on that date. The data in that document comes from emails rapports that are automatically sent when the backup finishes.
But here comes the bad part: Once in a week there is an employee who checks ALL THE EMAILS and manually fills the backup log. This was too much for me, especially knowing that we only have about 5 employees.
Solution: Make a script that does it for you. Yeah, I know and I think I'm capable of doing that, but there's a few things that I'm not sure about and I hope you guys could help me with it:
The mails are all in a different folders in an inbox that I had to add to my outlook manually and I don't know how I can programmatically reach it.
I don't know in what language I should use for this. I'm able to do it in a lot of languages, but I don't know which one suits this best
These are the only two things that I don't know and I would really appreciate it if you could help me with this.
EDIT:
The server is an exchange server with IMAP enabled. I eat java for breakfast and I've used JavaMail before, so I think I'll go with that, thanks

This is a pretty open-ended question....
You should pick a language that you're comfortable with and that has a good email support library, e.g., JavaMail for Java.
If the messages are in an Exchange server that has enabled IMAP support, you should be able to read the messages using JavaMail or any other library that support IMAP. If the server only supports the Microsoft proprietary protocol, you have fewer choices.
We really need to know more about the mail server you're using to offer much more guidance.

Related

How to save Lync conversation history when Corp has blocked this feature?

I am using Lync 2010 (4.0.7577.4356), which we use on my small development team for IM'ing. Lots of technical Q&A are handled through this program and lots of other items that need to be documented. Unfortunately, our parent company has a policy that turns off "Converation History", so once the window is closed, it's gone.
I've done a fair bit of research and I haven't found a way to save this data since the settings have been made at our parent Corporation's level (through Active Directory, or whatever). This is information that we need and even my boss has tried finding a way to save this information (everything short of copy-pasting everything before closing the window or computer).
How can I accomplish this task? Are there any programs out there (freeware or otherwise) that can save these conversations? Does anyone know of a way that I can hook up Lync (the instant messaging module) to another instant messenger (GTalk, Jabber, ICQ, Yahoo, or whatever) -- then record each message from there? I'm a software developer, so if anyone knows of a means of communicating with Lync, and is able to access the messages, that would help too!
Anything at this point would help... thanks in advance!!!
-Panuvin
Try this https://github.com/bujocek/LyncIMLocalHistory. I've used the Tom Morgans answer and created own local lync (Skype for Business) conversation history tracker.
You can build it from source or just unpack and run latest release here: https://github.com/bujocek/LyncIMLocalHistory/releases
There's a client-side Lync SDK, which is pretty easy to use if you're already a .NET developer.
It's easier to do something like this and have it running on every member of your small dev team's machine alongside Lync - easier than trying to re-invent a central conversation store.
I recently blogged about recording the length and status of Conversations, and also about identifying different sorts of Call within the Conversation (you'd be looking for Instant Message Call type).
After that, you'd need to subscribe to the Flow and catch every message to and fro, and log them to a database or whatever. There's a really good book which could help you with this: Unified Communications with Microsoft Lync. If you're serious about doing Lync development, this is definitely the book for you!
With Lync 2013, CTRL+S will save the current tab to your Outlook/Exchange Conversation History folder. I'm not certain if this works with 2010.
You may try this: https://github.com/PhilippeRaemy/LyncLog.
This tool saves the conversations in text files, using a file naming convention that makes it easy to identify the time and participants.

Outlook Emails to assigning database

I'm def not looking for someone to do this project for me, just bouncing off some ideas with a guru or two.
I have emails going into a global box that is shared by a few employees. I need to find a better way to assign the work out. In the past, it was grab and go. Today, an employee assigns the work out.
I'm trying to find a simple way using maybe Excel or Access, that I could copy/drag the email and it would provide who should work it and how much work they have done by week/month/year.
It's not possible to use an inhouse ticketing system, because it is non employees that send mail to this inbox, so they would not have access to using the in house ticketing system.
Would it be easily possible to design something like this or is this a more daunting task? What software would you recommend or method would you use?
Thanks for your time.
I recommend converting emails to Tickets, using a CRM/ticketing system with such feature. It would save you the hassle of developing and mantaining custom code, for a commom feature needed not only by you, but many other firms:
A quick search for "convert emails to tickets" yielded:
https://wiki.vtiger.com/index.php/Mail_Converter
http://community.geminiplatform.com/blogs/15/how-to-convert-emails-to-tickets-with-gemini
Both vTiger and Gemini are free to use.

Reading email in MS Outlook

this one is of clumsy implementation type and I have small knowledge about MS products.
Task: Access MS Exchange Server (outlook or whatever) and parse all unread emails with specific sent date, subject, from address. Certain data should be saved during parsing (like a flag/boolean array or something similar)
Requirements: should be done either through scripting language (no matter which one, looks like VBS suits this task) or any other method that will be able to perform slight analysis and return an exit code and a message (I'm thinking about web services that might exist in OWA, or any thing else).
Thanks in advance.
Use a driver or dll for you language of choice, I know C# / VB have libraries to accomplish this. A web server is fine if its going to not be a headache setting up access between servers, or if its on the same box with permissions.
Should do the trick, I would personally use C# as it would make this incredibly easy with the .net libraries and OLEDrivers.

Allow users to upload files to server via email?

I am administrating a small, private website with 100% trusted users (about 60 people, i know them all personally).
I am having many problems with the PHP based upload system i have in place currently, mainly with users encountering timeout errors and other varying issues due to the way the upload is handled (not to mention the complete deadzone in the UI created by making the user stare blindly at the page until the upload finishes
Anyways, i have been tossing around alternative forms of file uploading i could offer. FTP accounts were nixed due to the level of tech savvy required. Flash/Java uploaders were nixed because i don't really want proprietary third party applets running on my site.
The other idea i came up with that i think would be perfect would be to offer the ability to EMAIL the files to the server. Emailing attachments is a simple enough task, and better yet it provides the user with some tangible feedback to the uploading process.
My question is, how could i go about implementing such a system?
The server is running Gentoo Linux with Apache and i have full root access. Mail dameons can be installed to my needs.
If you have a better way to upload files, perhaps you could offer that instead?
Stick with PHP. It's certainly not perfect but the problems you're describing can probably be handled. max-execution-time and upload_max_filesize are configurable values. I would at least try tweaking those numbers (no php code changes required) before trying to implement an email based solution.
There are several file upload libraries with progress bars using pure javascript. Keep it in PHP.

Best method to write an email poller

I am working on an email polling solution, for a multi-user system. So users can send emails on their respective ids and it would be polled and inserted to a db.
There are two options that I am considering:
Perl/Unix based email pollers..
A java based poller.
What would you recommend.. (other suggestions are also welcome)
Instead of polling, why don't you forward the mail to a process? Depending on the mail server you use, you can do that as an alias or even in the .forward file.
I've nothing much to add to this, but there's currently a project at google code to rebuild iwantsandy.com as open source.
It's at:
http://code.google.com/p/sandysback/
I'm definitely going to be watching this to see how they parse emails, and have those emails "inserted into a db"
Whichever language you have most experience in!
I personally know java and perl well and for this task I would choose perl but the differneces are marginal.
Perl would be shorter and sweeter, java would be take longer but probably be a more robust solution once the database access is sorted out.
I find Perl DBI is a better and more portable database interface than JDBC which does not hide database implementations from your code and is sensitive to version changes etc. I.E. you must have the right version of the right database driver for your target database.
RE: Poling
If you have the option to forward the email to a process I would highly recommended you do that. (Forwarding generally puts less load on the server than poling does.) If not, then poling is the next best thing. Look into the POP3 client libraries on whichever language you are most comfortable with.
RE: Language choice
If I intended to do a lot of parsing of the emails then Perl would be my choice. If not much parsing is involved then Java would be the way to go for me ;-).
-- In a former life I wrote a Perl script to parse (well structured) incoming emails into HTML pages and post them to a web server.
You have a couple of options. As the orginal poster said - probably the simplest way is to set up an entry in the aliases file to a script.
Then the body of the email gets passed as standard input to the script. You can then use a perl script + Mime modules to parse out the bits of the message and do whatever you want with it.
One might also look at apache james - which is a custom mail server. They have the equivilent of servlets, called 'maillets' that you put your business logic in. They often hard to deploy in enterprise scenario's though as most companies don't like having custom mailservers being deployed.
... the aliases route is probably your best bet. one other note of caution - email isn't gauranteed. if you are using this as some sort of app to app messaging system, and you control both ends, you should probably look at something else, like JMS type messaging.
-Ace