title: Sequence diagram for sending requests to JSON API and for using an SMTP Server?
body: <p>I have developed a web application that sends HTTP requests to a JSON API and gets responses from it. It is also sending E-mails via an SMTP server to users. I am stuck on how to modelise these scenarios in my sequence diagrams.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>The sequence for logging in goes as the following:</p>
  
  <p>1-The user inputs his login and password to the view</p>
  
  <p>2-The view sends the inputted data to the controller</p>
  
  <p>3-The controller calls a function located in the WebService class</p>
  
  <p>4- The functions creates an instance of the login request model (The login request model is a class that has the same format as the JSON data that will be sent)</p>
  
  <p>5- The function serializes the created instance to JSON and sends it via HTTP to the remote Web service</p>
  
  <p>6- The functions reads the response stream and deserializes it into a new instance of the response class</p>
  
  <p>7-The instance created then is sent back to the controller</p>
  
  <p>8-The controller runs a test on the received instance to see if the user has provided correct credentials or not </p>
  
  <p>9-Based on the test results, the controller redirects the user to either the landing page (in case he inputted the right credentials) or sends a message in the index page indicating that the credentials are wrong</p>
  
  <p>In this case, what will be the actors in my sequence diagram and what should I put in it and what should I leave undescriped?</p>