Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
EmailServer Class Reference

EmailServer is the process that handles the email server. More...

Inheritance diagram for EmailServer:
Process

Public Member Functions

bool addUser (string, string)
 Adds an email user with the specified username and password. More...
 
bool deleteUser (string)
 Removes the email user with the specified username. More...
 
void changePassword (string, string)
 Changes the password of the email user with the specifed username. More...
 
EmailUser getEmailUser (string)
 Returns the email user with specified username. More...
 
vector< string > getAllEmailAcctAsStrings ()
 Adds an email user with the specified username and password. More...
 
void updateAllAccounts (string)
 Updates passwords and adds user accounts based on the given formatted string.
Format each entry as "name:password;". So two entries would be formated as "name1:password1;name2:password2;" If a username exists, the password will be set. If a username doesn't exist, the entry will be added. More...
 
- Public Member Functions inherited from Process
Device getOwnerDevice ()
 Returns the device for this process. More...
 

Detailed Description

EmailServer is the process that handles the email server.

Member Function Documentation

◆ addUser()

bool EmailServer::addUser ( string  ,
string   
)

Adds an email user with the specified username and password.

Parameters
name,theusername for the email user.
password,thepassword for the email user.
Returns
bool, true if successful, otherwise false.

◆ changePassword()

void EmailServer::changePassword ( string  ,
string   
)

Changes the password of the email user with the specifed username.

Parameters
name,theusername of the email user of interest.
newpassword,thenew password for the email user.

◆ deleteUser()

bool EmailServer::deleteUser ( string  )

Removes the email user with the specified username.

Parameters
name,theusername of the email user of interest.
Returns
bool, true if successful, otherwise false.

◆ getAllEmailAcctAsStrings()

vector< string > EmailServer::getAllEmailAcctAsStrings ( )

Adds an email user with the specified username and password.

Returns
vector<string>, Return is all email accounts. Each entry is in the format "name:password", like "jitu:jituPass".

◆ getEmailUser()

EmailUser EmailServer::getEmailUser ( string  )

Returns the email user with specified username.

Parameters
username,theusername of the email user of interest.
Returns
EmailUser, the EmailUser object with the specified username.

◆ updateAllAccounts()

void EmailServer::updateAllAccounts ( string  )

Updates passwords and adds user accounts based on the given formatted string.
Format each entry as "name:password;". So two entries would be formated as "name1:password1;name2:password2;" If a username exists, the password will be set. If a username doesn't exist, the entry will be added.


The documentation for this class was generated from the following file: