title: Why JMS to send mail by Java Mail
body: <p><strong>Scenario 1 :</strong></p>
  
  <ol>
  <li>Setup a JMS Queue in your server</li>
  <li>Java code to send Messages to Producer
  Create a JMS Producer, which when invoked, should receive the email data (subject, body, to , cc etc) and post it to the Queue setup in step 1</li>
  <li>Create a JMS Consumer, which subscribes to the Queue created in Step 1, and its onMessage should call the JavaMail API to send the email.</li>
  </ol>
  
  <p><strong>Scenario 2 :</strong></p>
  
  <ul>
  <li>Directly call the JavaMail API to send the email.</li>
  </ul>
  
  <p>I know about how to use and what JMS and Java Mail are doing.Thing is why we have to go from Scenario 2 to Scenario 1 for sending mails.Initially we did Scenario 2.Now we are using Scenario 1.From Different parts of the Big Application are sending mails so we use JMS Queue ,there will be Consumer of Queue from there sending mails.Please help me to understand.</p>