Sup guys... I have been scratching my head on this one... I have a mail client that will check local mail etc... (via the imap functions)... Now how about this I want to be able to check mail on another server (this is done), and then retrieve the mail on that server and save it to the local imap folder. (errr.. mailbox whatever). Well I have given it some thought and come up with a couple solutions but was wondering if there is something simple I am just overlooking:
1) Just email the emails from the remote mailbox to the local one then delete... this has problems in that there is a delay possibly...
2) Grab the headers and body from the remote server... open the mailbox file with the fopen function and forcibly add the headers...etc... This could be potentially nasty and would have to do a lot of error checking
3) Forget all the imap functions and work with sockets on this one... It would work but the code would be nasty.
Any solution I am leaving out?
Just to clarify:
Open Remote connection (done)
Check for new messages (done)
If new messages grab them and stash them into the mailbox on the localhost (???)
FYI. I have checked almost all the nice Imap functions, but they all seem to only work inbetween mailboxes on a local or remote server and cant "talk" back and forth.
thx.