Im in the process of constructing a Webmail SPA, similar to Gmail, for end users. This app will be hosted on a cPanel shared hosting (LAMP stack). The end users have no cpanel email access otherwise. My app will be their access portal for these email accounts.
If it matters, I'm preferably a node developer, with LAMP experience, so I'm open to any broad suggestions. Note, normally im just bouncing things out, using smtp. Would i just do this straight Imap? I just want to know on an architectural level what service i need to be accessing, or looking for and maybe a point in the direction of some example.
Maybe a wire-frame, a flowchart, or a sentence that can describe how I can implement it will suffice. I can find the technologies, I just need a road map.
This is a RHEL6
$ uname -a
Linux 2.6.32-604.30.3.lve1.3.63.el6.x86_64 #1 SMP Sun Sep 27 06:34:10 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
Some questions based on the only way im able to think about this problem:
What protocol normally accesses the email (user?) Would i be getting something, maybe an internal mail command access from system environment variables, or PATH maybe? Would i ping for a user list, i mean what information does the app need to connect to the mail server, and what protocol would i get that from? I think this is my hitch.
I guess the first thing, is during post, it auths, what happens after auth, what protocol, where/what will i be looking to make that decision based on, and how do i pull in the email list after? Im guessing this is just an IMAP requst. Is that all i need? e.g. php mail()
or nodemailer
?
Also I cant seem to come up with the proper terminology to get any meaningful google search results, I'm open to search query help as an alternative, not sure what techs I'im looking for yet.
Edit:
On some research i have found the following;
Some search terms that are finally yielding a few results
webmail interfacing php
(or node)webmail single page application node
(or php)
Looks like this might be one example of a way a node app connects to an imap
https://github.com/cozy-labs/emails/blob/master/server/imap/pool.coffee
I believe that mail util is here https://www.npmjs.com/package/nodeutil
If someone can help me put this into perspective, that would be great.