title: Determining number of threads for sending mails using smtp
body: <p>I have to send 500 mails per user in an hour using Java mail api (SMTP).
  To accomplish that i have created a schedular which runs every hour gets all the users and allocate each user a thread to send mails.And i have created a fixed Thread pool of 10 threads so at a time 10 users is proccessed,But it takes around 10 minutes to process it.</p>
  
  <p>Ex: 1 thread per user 500 mails.
      For 10 users 10 threads 5000 mails.</p>
  
  <p>How do i send mails to 10k users, since 10 users are proccessed at a time.
  What will be the ideal number of threads to accomplish the above task within the time limit of 1 hour.</p>
  
  <p>System Specs : RAM 4GB.
  HD : 500GB</p>
  
  <p>My app is build on SpringBoot.</p>
  
  <p>Thanks.</p>