title: How to easily integrate emails in a CRM app?
body: <p>I am building a CRM app, where I want to give the user the option to read incoming emails, and send emails to contacts.</p>
  <p>I am not looking to create a full webmail client but just read/write emails. The user would have to provide their email credentials somehow in the app, to attach their account. It has to work with both Microsoft Exchange and Gmail.</p>
  <p>The front-end is really easy, but I have not found a simple way to implement the back-end. For the moment I am using Zapier. A Zap listens to new incoming emails, searches for a corresponding contact in the CRM, and then, if found, creates a new &quot;Email message&quot; document in the database (Firebase/Firestore)</p>
  <p>But it has two major problems:</p>
  <ul>
  <li>I need to ask the user for their email credentials to create a new Zap for them, which is a horrible user experience</li>
  <li>Zapier will consume at least one task for EACH email the user receives, whether it is realted to a CRM contact or not. This will be impossible pricing-wise as the user base grows.</li>
  </ul>
  <p>I am not able to develop this all myself. Does anyone know of a JS library or a more likely a third-party tool that could help? I need something that would:</p>
  <ul>
  <li>Handle authentification workflow with Gmail and Exchange to attach the user email account</li>
  <li>Listen to incomding emails</li>
  <li>Send emails</li>
  </ul>
  <p>I am using Vuejs3 and Firebase.</p>
  <p>Thanks for any hint!</p>