I am in testing mode for this part of my app so I can change anything to make this work.
I have added email functionality to one of my apps. I use SMTP to send and either POP3 or IMAP4 to receive. For the receive I store everything into tables except attachments - they are in a directory and only referenced in the tables.
Everything works fine so no problem getting email to work.
What I am wanting has to do with the interface. Everthing for viewing an email account and emails looks good and works. One of the tables I have has 'folder' names called 'Inbox, outbox, trash, etc.' - the standard 'folders' in an email app. Clicking (from a list box control) on any of those shows the emails in the appropriate 'folders'
What I want now is to allow an end user to add their own 'folders' - Such as Clients. I can do that but now I want 'sub folders'. Such as under Clients they may have a Jane Doe 'folder', a Joe Blow 'folder', etc.
That is the part I am having trouble with. How can I set up the table to accomodate that and more importantly how can I display it in a nested fashion.
I was fooling with a table like so:
tblMailUserFold ers
MailUserFolderI D - autonumber
MailUserFolderN ame - text
MailUserParentF olderID - number (long)
The MailUserParentF olderID would reference back to the MailUserFolderI D
example
Record 1
MailUserFolderI D = 1
MailUserFolderN ame = Clients
Mail UserParentFolde rID = NULL - NULL would indicated root folder
Record 2
MailUserFolderI D=2
MailUserFolderN ame = Jane Doe
MailUserParentI DFolderID = 1 - any value here other than NULL would indicated a nested folder
I have no problem getting the data in but cannot figure out how to display it in a nested view.
Remember this is in testing mode and I can make any changes. The only requirement I have is that tables are used and NOT real directories.
Any ideas?
cheers
I have added email functionality to one of my apps. I use SMTP to send and either POP3 or IMAP4 to receive. For the receive I store everything into tables except attachments - they are in a directory and only referenced in the tables.
Everything works fine so no problem getting email to work.
What I am wanting has to do with the interface. Everthing for viewing an email account and emails looks good and works. One of the tables I have has 'folder' names called 'Inbox, outbox, trash, etc.' - the standard 'folders' in an email app. Clicking (from a list box control) on any of those shows the emails in the appropriate 'folders'
What I want now is to allow an end user to add their own 'folders' - Such as Clients. I can do that but now I want 'sub folders'. Such as under Clients they may have a Jane Doe 'folder', a Joe Blow 'folder', etc.
That is the part I am having trouble with. How can I set up the table to accomodate that and more importantly how can I display it in a nested fashion.
I was fooling with a table like so:
tblMailUserFold ers
MailUserFolderI D - autonumber
MailUserFolderN ame - text
MailUserParentF olderID - number (long)
The MailUserParentF olderID would reference back to the MailUserFolderI D
example
Record 1
MailUserFolderI D = 1
MailUserFolderN ame = Clients
Mail UserParentFolde rID = NULL - NULL would indicated root folder
Record 2
MailUserFolderI D=2
MailUserFolderN ame = Jane Doe
MailUserParentI DFolderID = 1 - any value here other than NULL would indicated a nested folder
I have no problem getting the data in but cannot figure out how to display it in a nested view.
Remember this is in testing mode and I can make any changes. The only requirement I have is that tables are used and NOT real directories.
Any ideas?
cheers
Comment