Linking the new structured functions with the template generation

- Placed correctly the functions out of common.inc file.
- Implemented the function that update/retrieve the table information.
- error_supression(0) since imap library brings "Notice" messages.