title: How do I email an HTML report (as an attachment) with images embedded?
body: <p>I am creating a report with ExtentReports to be emailed out to team members outside of the domain. I use a screenshot method (below) to save screenshots of test failures. They are stored in a child folder to the ExtentReports HTML report. </p>
  
  <p>I attach the report to an email, and in it, the images display fine for team members on the domain with folder permission. But I am at a loss for how to allow people outside of that folder's permissions, to see the images embedded in the report. This is the HTML for the image, directly referencing that file. </p>
  
  <pre><code>&lt;img class="report-img" data-featherlight="file:///\\domain.local\files\QA\Projects\AutomationReports\ExtentScreens\1486487870116.jpg" src="file:///\\domain.local\files\QA\Projects\AutomationReports\ExtentScreens\1486487870116.jpg"&gt;
  </code></pre>
  
  <p>Here is my screenshot method.</p>
  
  <pre><code>public static String CaptureScreen(WebDriver driver) {
      String ImagesPath = "\\\\domain.local\\files\\QA\\Projects\\AutomationReports\\ExtentScreens\\"
              + new Date().getTime();
  
      TakesScreenshot oScn = (TakesScreenshot) driver;
      File oScnShot = oScn.getScreenshotAs(OutputType.FILE);
      File oDest = new File(ImagesPath + ".jpg");
  
      // System.out.println(ImagesPath);
  
      try {
          FileUtils.copyFile(oScnShot, oDest);
      } catch (IOException e) {
          System.out.println(e.getMessage());
      }
      return ImagesPath + ".jpg";
  }
  </code></pre>
  
  <p>I have 2 unrelated ideas on how to fix this. But I need some help getting started with either of them. I'm open to other suggestions.</p>
  
  <ol>
  <li><p>Embed images directly into the HTML report or somehow send a folder containing screenshots with the HTML report. However, the HTML will still reference my original location and the images will be broken.</p></li>
  <li><p>Share the folder containing images with Everyone, Guest, and Anonymous User, so people outside of the domain can open HTML that references this location. I don't know how to set these permissions, and I'm not even sure that doing so will allow an external user to view HTML referencing the location.</p></li>
  </ol>