CodeIgniter Forums
drag'n drop email from client to webapp - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: drag'n drop email from client to webapp (/showthread.php?tid=17917)

Pages: 1 2


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]rogierb[/eluser]
Hi all,

Anybody know how to get email from a mailcleint like outlook, outlook express or thunderbird into an webapp (CI)? The only way I can think of is using either flash or activeX. But I dont like either.

Copy paste the contents might be a solution but will certainly not win any prizes;-)

I would like to do the same with documents and auto-upload them.

Anyone got any ideas?


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]xwero[/eluser]
Getting email from an email client is the difficult way. Many people have two or more computers, because of the netbook boom, plus a email pushing mobile phone. Fetching emails from one client application can leave emails untouched fetched by another email client. Why not fetch the emails from the email server?

I guess you are looking for a dropbox kind of application which synchs files with the app you are building. I think you know browsers have a restricted file access for security reasons but there are java solutions that circumvent the restrictions, trephine is one of the newer ones that interfaces with javascript.


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]Dam1an[/eluser]
Another (potential) solution would be to have an API for your web app, and then have a service installed on the users computer, which then calls the API sending any new emails, but like xwero said, its best to go striaght to the source (the server)


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]rogierb[/eluser]
Hi Xwero,

Luckily this app has limited users and all users use outlook (except for me;-))
So this narrows things down a lot.

The problem with fetching from email from a server is that I don't know what server;-)

Basically the idea is a user creates a project of some sort and adds all relevant info to it.
This info can be a doc but an email aswell. Maybe even bussinesscards and everything else they can come up with(*sigh*)

So I thought I'd start email. I know it is possible to drag 'n drop in VB but hat is not an option.

Edit: Next time I'll try to be more specific;-) Just read my post and it doesn't explain my problem... Mondays...


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]xwero[/eluser]
I assume the project app is the CI app, so why not let them upload everything they can think of? I guess the content of upload needs to be read so you need to split up the files in binary, where you can only read a few formats, and text type files.

If you are looking for a desktop application that does this i think you have to build one yourself, I guess a widget would be the easiest way to do it but then you have to convince them to use a certain widget platform.


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]rogierb[/eluser]
Well, why not upload... ehm, because someone sold them a solution using drag 'n drop.
Probably during an expensive dinner and loads of alcohol;-)

Uploading would be the easiest way and I'd probably go with that for the documents. But email is a different story. I can't expect users to save their email to disk and the upload.

So maybe drag the email to a ()hidden) textarea and then auto save. But then I have to catch the drag 'n drop. Is that even possible?

I'm using jquery. Catching paste or input I can do, but drag 'n drop...


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]xwero[/eluser]
I'm not sure if it works but what happens if you drag an email from an email client and drop it into a file field? Lately i'm surprised more and more by the cross application drag and drop functionalities. If it works like it think the file fields so going to be populated by a .eml file.


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]rogierb[/eluser]
nope, nada luck, it just opens the file in the browser, at least for known formats.

I tried a java applet for file upload and that seemed to work. Maybe flash would be ever better although I don't either.


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]Matthieu Fauveau[/eluser]
A good solution would be to rely on a mailserver. Your CI app creates a special email address (userXXXX(at)yourciapp.com) which will be parsed by IMAP (using a PHP class).

I'm sure you can find clues on how to do that on Google Wink


drag'n drop email from client to webapp - El Forum - 04-20-2009

[eluser]rogierb[/eluser]
@Matthieu Fauveau it is not about emails send from CI. It is about email from unkown accounts on the client side. Potentially there can be as many (or more) servers or emailaddresses as there are users. So I have to rely on the client side.