You need to whitelist your domain for cross-origin resource sharing (CORS) in Salesforce Lightning to email multiple agreement documents in lightning.

To configure CORS

  1. Go to Setup > Security > CORS.
  2. In the Whitelisted Origins section, click New.
  3. In the Origin URL Pattern field, add <yourdomainname>.lightning.force.com
    Sample valuehttps://testclm.lightning.force.com.
  4. Click Save.