Git Product home page Git Product logo

mail-client's People

Contributors

shads06 avatar

Watchers

 avatar  avatar

mail-client's Issues

Mail Server Activity History

For each entity, it's history of activities like update, status changed, enabled/disabled except view/read must be saved and shown to user when they view details of Mail Server

Write a function to create a folder for accounts after authentication

Feature
After successfully authentication application will ask user to give a user name and email ID which is just authenticated. Once user provide the asked details application must store these details locally in a folder.
When details are received, it will be stored in a XML file where all other account details are stored, other a separate folder will be created where authenticated token will be stored which will be copied back in master folder which will be the default authentication location.

Solution
We need a function (separate and individual) which will receive a folder name as a parameter and create a folder in accounts folder of central location where all accounts are stored.
NOTE: naming for account name uniquely is not finalised yet. like Name: Sharad EmailID: [email protected] then name for folder could be Name +(plus) EmailID but naming must be based on windows naming convention

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Change location of data storage for local files or XML

Currently, data of Mail Client i.e. Email IDs are stored in Mail Client executable directory's bind folder which is present in C drive as on Windows.

If anything goes wrong with Windows, data will be lost.

You can make this storage of data to be customized using a config file.

Most probably data will be stored in C drive App Data folder or D or any other drive other than C drive.

Calculate ID of the last contact saved

Write a function to perform the following activities

  1. Read a Contact XML file from a location specified somewhere (at runtime the location will be provided to the function)
    AND
  2. Find the ID of the last contact saved in that file
    AND
  3. Return the ID value

The function must also check for following

  1. Input is a valid path.
  2. User has access to the path specified in the input.
  3. User has access to read the specified file in the path
  4. Function must execute within 1 second

Input:

  • Location of Contact XML file in string format

Output:

  • Return the ID of last Contact Saved in integer format
    OR
  • Return -1 if there is no Contact saved in the file
    OR
  • Throw a respective exception if failed to retrieve the ID

Test Cases:

  1. Valid Path and 1 Contact Exist
    Input: C:\Data\Contacts.xml
    Output: 1
    Data in Contacts.xml:

             <Contact ID=1>
    
                 <Name>Rahul</Name>
    
                 <EmailID>[email protected]</EmailID>
    
                 <Status>1</Status>
    
                 <CreatedOn>29-Sep-2020</CreatedOn>
    
                 <LastUpdatedOn/>
    
             </Contact>
    
     </Contacts>
    
  2. Invalid Path and 1 Contact
    Input: C:\Data\Contacts1.xml
    Output: "Exception"
    Data in Contacts.xml:

             <Contact ID=1>
    
                 <Name>Rahul</Name>
    
                 <EmailID>[email protected]</EmailID>
    
                 <Status>1</Status>
    
                 <CreatedOn>29-Sep-2020</CreatedOn>
    
                 <LastUpdatedOn/>
    
             </Contact>
    
     </Contacts>
    
  3. Valid Path and No Contact
    Input: C:\Data\Contacts.xml
    Output: -1
    Data in Contacts.xml:

     </Contacts>
    

Write a function to write account details in XML

Problem and Solution

Write a function that will receive account details from user after successfully authorising application in a object of account details and this function will write all these information in a XML file locally.

Account details object will be created using account class where class will have properties to get and set Name, and Email ID which will be retrieved when saving in XML file.

This function will be written in C#.
A new class will be created for this in same project.

Alternative

One could create completely a library project and add in existing solution and used in existing project using reference.

Write a function to check duplicate account name

Feature.
As user is asked to tell system account name and emailID that he/she just authenticated and authorized, there is a possibility that a user could enter a duplicate account name that is already present in system. We need to check if account name already exist or not after user provided name to system.

Solution
Account name must be unique because the same will be used to create a separate directory for it's authentication token.
We will create a function name that will receive a account name as argument and it will check in XML file where all other account details are stored to see if same name already exist or not. This function will return a boolean value 1 or true if account name already exists and 0 or false if account name do not exists. This function will use other function which read all data from XML file.

Alternative
Store a unique number with every account name and email ID in XML file which Unique number will be the name of folder (directory) to store token. This alternative will not require check duplicate method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.