Please refer my previous articles to create an app for Outlook Web App

Visual Studio 2013: http://www.c-sharpcorner.com/UploadFile/anavijai/office-365-how-to-create-an-app-for-outlook-2013-using-visu/

Napa Tool: http://www.c-sharpcorner.com/UploadFile/anavijai/office-365-how-to-create-an-app-for-outlook-web-app-using-n/

In this blog you will see how to get the recipients in a read form in Outlook Web App.

AppRead folder: Home.html

  1. <body>
  2. <!-- Page content -->
  3. <div id="content-main">
  4. <div class="padding">
  5. <p><strong>Gets the recipients of an email message in a read form.</strong></p>
  6. <table id="details">
  7. <tr>
  8. <th>To Address:</th>
  9. <td id="toAddress"></td>
  10. </tr>
  11. </table>
  12. </div>
  13. </div>
  14. </body>
  15. Home.js
  16. /// <reference path="../App.js" />
  17. /*global app*/
  18. (function () {
  19. 'use strict';
  20. // The Office initialize function must be run each time a new page is loaded
  21. Office.initialize = function (reason) {
  22. $(document).ready(function () {
  23. app.initialize();
  24. displayItemDetails();
  25. });
  26. };
  27. // Displays the "Subject" and "From" fields, based on the current mail item
  28. function displayItemDetails() {
  29. var item = Office.cast.item.toItemRead(Office.context.mailbox.item);
  30. // Similaryly to get cc receipients:item.cc and for bcc : item.bcc
  31. var test=item.to;
  32. for (var i=0; i<test.length; i++)
  33. document.getElementById('toAddress').innerHTML += "<b>Display Name:</b> "+ test[i].displayName+ "; <b>Email:</b> "+ test[i].emailAddress+"<br/>";
  34. }
  35. })();
Output



Reference:

https://msdn.microsoft.com/en-us/library/office/fp142279.aspx