Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit 6cf0a8b

Browse files
authored
Updated description in YAML metadata
1 parent 2fbd53a commit 6cf0a8b

File tree

1 file changed

+103
-102
lines changed

1 file changed

+103
-102
lines changed

README.md

Lines changed: 103 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -5,111 +5,112 @@ products:
55
- office-365
66
languages:
77
- javascript
8+
description: This sample shows you how to get attachments from an Exchange mailbox.
89
extensions:
910
contentType: samples
1011
technologies:
1112
- Add-ins
1213
createdDate: 8/11/2015 1:48:02 PM
1314
---
14-
# Outlook add-in: Get attachments from an Exchange server
15-
16-
**Table of contents**
17-
18-
* [Summary](#summary)
19-
* [Prerequisites](#prerequisites)
20-
* [Key components of the sample](#components)
21-
* [Description of the code](#codedescription)
22-
* [Build and debug](#build)
23-
* [Troubleshooting](#troubleshooting)
24-
* [Questions and comments](#questions)
25-
* [Additional resources](#additional-resources)
26-
27-
<a name="summary"></a>
28-
##Summary
29-
This sample shows you how to get attachments from an Exchange mailbox.
30-
31-
<a name="prerequisites"></a>
32-
## Prerequisites ##
33-
34-
This sample requires the following:
35-
36-
- Visual Studio 2013 with Update 5 or Visual Studio 2015.
37-
- A computer running Exchange 2013 with at least one email account, or an Office 365 account. You can [join the Office 365 Developer Program and get a free 1 year subscription to Office 365](https://aka.ms/devprogramsignup).
38-
- Any browser that supports ECMAScript 5.1, HTML5, and CSS3, such as Internet Explorer 9, Chrome 13, Firefox 5, Safari 5.0.6, or a later version of these browsers.
39-
- Familiarity with JavaScript programming and web services.
40-
41-
<a name="components"></a>
42-
## Key components of the sample
43-
The sample solution contains the following files:
44-
45-
- AttachmentExampleManifest.xml: The manifest file for the Outlook add-in.
46-
- AppRead\Home\Home.html: The HTML user interface for the mail add-in for Outlook.
47-
- AppRead\Home\Home.js: The JavaScript file that handles sending the attachment information to the remote Attachment service included with this sample.
48-
49-
The AttachmentService project defines a REST service by using the WCF API. The project contains the following files:
50-
51-
- Controllers\AttachmentServiceController.cs: The service object that provides the business logic for the sample service.
52-
- Models\ServiceRequest: The object that represents a web request. The contents of the object are created from a JSON request object sent from your mail add-in.
53-
- Models\Attachment.cs: The utility object that helps deserialize the JSON object that is sent by the mail add-in.
54-
- Models\AttachmentDetails.cs: The object that represents the details of each attachment. It provides a .NET Framework object that matches the mail add-in's `AttachmentDetails` object.
55-
- Models\ServiceResponse: The object that represents a response from the web service. The contents of the object are serialized to a JSON object when they are sent back to the mail add-in.
56-
- Web.config: Binds the sample service to the web server endpoint.
57-
58-
59-
60-
<a name="codedescription"></a>
61-
##Description of the code
62-
63-
This sample shows you how to retrieve attachments from a web service that supports your mail add-in. For example, you can create a service that uploads photos to a sharing site, or a service that stores documents into a repository. The service gets the attachments directly from the Exchange server, and doesn't require the client to perform extra processing to get the attachment and then send it along to the service.
64-
65-
The sample has two parts. The first part, the mail app, runs in the email client. The mail add-in is shown whenever a message or an appointment is the active item. When you select the **Test attachments** button, the mail add-in sends details about the attachment to the web service that processes the request. The service uses the following steps to process attachments:
66-
67-
- Sends a [GetAttachment](http://msdn.microsoft.com/library/aa494316(v=exchg.150).aspx) operation request to the Exchange server that hosts the mailbox. The server responds by sending the attachment to the service. In this sample, the service simply writes the XML from the server to trace output.
68-
- Returns the number of attachments processed to the mail app.
69-
70-
71-
72-
<a name="build"></a>
73-
## Build and debug ##
74-
**Note**: The mail add-in will be activated on any email message in the user's Inbox that has one or more attachments. You can make it easier to test the add-in by sending one or more email messages to your test account before you run the sample add-in.
75-
76-
1. Open the solution in Visual Studio.
77-
2. Right-click the solution in Solution Explorer. Select **Set Startup Projects**.
78-
3. Select **Common Properties**, and choose **Startup Project**.
79-
4. Make sure that the **Action** for **AttachmentExampleService** project is set to **Start**.
80-
5. Press F5 to build and deploy the sample add-in.
81-
6. Connect to an Exchange account by providing the email address and password for an Exchange 2013 server.
82-
7. Allow the server to configure the mail account.
83-
8. Log on to the email account by entering the account name and password.
84-
9. Select a message in the Inbox.
85-
10. Wait for the add-in bar to appear over the message.
86-
11. In the add-in bar, click **AttachmentExample**.
87-
12. When the mail add-in appears, click the **TestAttachments** button to send a request to the Exchange server.
88-
13. The server will respond with the number of attachments processed for the item. This should equal the number of attachments that the item contains.
89-
90-
<a name="troubleshooting"></a>
91-
##Troubleshooting
92-
The following are common errors that can occur when you use Outlook Web App to test a mail add-in for Outlook:
93-
94-
- The add-in bar does not appear when a message is selected. If this occurs, restart the application by selecting **Debug – Stop Debugging** in the Visual Studio window, then press F5 to rebuild and deploy the add-in.
95-
- Changes to the JavaScript code may not be picked up when you deploy and run the add-in. If the changes are not picked up, clear the cache on the web browser by selecting **Tools – Internet options** and clicking the **Delete…** button. Delete the temporary Internet files and then restart the add-in.
96-
97-
<a name="questions"></a>
98-
##Questions and comments##
99-
100-
- If you have any trouble running this sample, please [log an issue](https://github.com/OfficeDev/Outlook-Add-in-Javascript-GetAttachments/issues).
101-
- Questions about Office Add-in development in general should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/office-addins). Make sure that your questions or comments are tagged with [office-addins].
102-
103-
104-
<a name="additional-resources"></a>
105-
## Additional resources ##
106-
107-
- [More Add-in samples](https://github.com/OfficeDev?utf8=%E2%9C%93&query=-Add-in)
108-
- [Web API: The Official Microsoft ASP.NET Site](http://www.asp.net/web-api)
109-
- [How to: Get attachments from an Exchange server](http://msdn.microsoft.com/library/dn148008.aspx)
110-
111-
## Copyright
112-
Copyright (c) 2015 Microsoft. All rights reserved.
113-
114-
115-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
15+
# Outlook add-in: Get attachments from an Exchange server
16+
17+
**Table of contents**
18+
19+
* [Summary](#summary)
20+
* [Prerequisites](#prerequisites)
21+
* [Key components of the sample](#components)
22+
* [Description of the code](#codedescription)
23+
* [Build and debug](#build)
24+
* [Troubleshooting](#troubleshooting)
25+
* [Questions and comments](#questions)
26+
* [Additional resources](#additional-resources)
27+
28+
<a name="summary"></a>
29+
##Summary
30+
This sample shows you how to get attachments from an Exchange mailbox.
31+
32+
<a name="prerequisites"></a>
33+
## Prerequisites ##
34+
35+
This sample requires the following:
36+
37+
- Visual Studio 2013 with Update 5 or Visual Studio 2015.
38+
- A computer running Exchange 2013 with at least one email account, or an Office 365 account. You can [join the Office 365 Developer Program and get a free 1 year subscription to Office 365](https://aka.ms/devprogramsignup).
39+
- Any browser that supports ECMAScript 5.1, HTML5, and CSS3, such as Internet Explorer 9, Chrome 13, Firefox 5, Safari 5.0.6, or a later version of these browsers.
40+
- Familiarity with JavaScript programming and web services.
41+
42+
<a name="components"></a>
43+
## Key components of the sample
44+
The sample solution contains the following files:
45+
46+
- AttachmentExampleManifest.xml: The manifest file for the Outlook add-in.
47+
- AppRead\Home\Home.html: The HTML user interface for the mail add-in for Outlook.
48+
- AppRead\Home\Home.js: The JavaScript file that handles sending the attachment information to the remote Attachment service included with this sample.
49+
50+
The AttachmentService project defines a REST service by using the WCF API. The project contains the following files:
51+
52+
- Controllers\AttachmentServiceController.cs: The service object that provides the business logic for the sample service.
53+
- Models\ServiceRequest: The object that represents a web request. The contents of the object are created from a JSON request object sent from your mail add-in.
54+
- Models\Attachment.cs: The utility object that helps deserialize the JSON object that is sent by the mail add-in.
55+
- Models\AttachmentDetails.cs: The object that represents the details of each attachment. It provides a .NET Framework object that matches the mail add-in's `AttachmentDetails` object.
56+
- Models\ServiceResponse: The object that represents a response from the web service. The contents of the object are serialized to a JSON object when they are sent back to the mail add-in.
57+
- Web.config: Binds the sample service to the web server endpoint.
58+
59+
60+
61+
<a name="codedescription"></a>
62+
##Description of the code
63+
64+
This sample shows you how to retrieve attachments from a web service that supports your mail add-in. For example, you can create a service that uploads photos to a sharing site, or a service that stores documents into a repository. The service gets the attachments directly from the Exchange server, and doesn't require the client to perform extra processing to get the attachment and then send it along to the service.
65+
66+
The sample has two parts. The first part, the mail app, runs in the email client. The mail add-in is shown whenever a message or an appointment is the active item. When you select the **Test attachments** button, the mail add-in sends details about the attachment to the web service that processes the request. The service uses the following steps to process attachments:
67+
68+
- Sends a [GetAttachment](http://msdn.microsoft.com/library/aa494316(v=exchg.150).aspx) operation request to the Exchange server that hosts the mailbox. The server responds by sending the attachment to the service. In this sample, the service simply writes the XML from the server to trace output.
69+
- Returns the number of attachments processed to the mail app.
70+
71+
72+
73+
<a name="build"></a>
74+
## Build and debug ##
75+
**Note**: The mail add-in will be activated on any email message in the user's Inbox that has one or more attachments. You can make it easier to test the add-in by sending one or more email messages to your test account before you run the sample add-in.
76+
77+
1. Open the solution in Visual Studio.
78+
2. Right-click the solution in Solution Explorer. Select **Set Startup Projects**.
79+
3. Select **Common Properties**, and choose **Startup Project**.
80+
4. Make sure that the **Action** for **AttachmentExampleService** project is set to **Start**.
81+
5. Press F5 to build and deploy the sample add-in.
82+
6. Connect to an Exchange account by providing the email address and password for an Exchange 2013 server.
83+
7. Allow the server to configure the mail account.
84+
8. Log on to the email account by entering the account name and password.
85+
9. Select a message in the Inbox.
86+
10. Wait for the add-in bar to appear over the message.
87+
11. In the add-in bar, click **AttachmentExample**.
88+
12. When the mail add-in appears, click the **TestAttachments** button to send a request to the Exchange server.
89+
13. The server will respond with the number of attachments processed for the item. This should equal the number of attachments that the item contains.
90+
91+
<a name="troubleshooting"></a>
92+
##Troubleshooting
93+
The following are common errors that can occur when you use Outlook Web App to test a mail add-in for Outlook:
94+
95+
- The add-in bar does not appear when a message is selected. If this occurs, restart the application by selecting **Debug – Stop Debugging** in the Visual Studio window, then press F5 to rebuild and deploy the add-in.
96+
- Changes to the JavaScript code may not be picked up when you deploy and run the add-in. If the changes are not picked up, clear the cache on the web browser by selecting **Tools – Internet options** and clicking the **Delete…** button. Delete the temporary Internet files and then restart the add-in.
97+
98+
<a name="questions"></a>
99+
##Questions and comments##
100+
101+
- If you have any trouble running this sample, please [log an issue](https://github.com/OfficeDev/Outlook-Add-in-Javascript-GetAttachments/issues).
102+
- Questions about Office Add-in development in general should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/office-addins). Make sure that your questions or comments are tagged with [office-addins].
103+
104+
105+
<a name="additional-resources"></a>
106+
## Additional resources ##
107+
108+
- [More Add-in samples](https://github.com/OfficeDev?utf8=%E2%9C%93&query=-Add-in)
109+
- [Web API: The Official Microsoft ASP.NET Site](http://www.asp.net/web-api)
110+
- [How to: Get attachments from an Exchange server](http://msdn.microsoft.com/library/dn148008.aspx)
111+
112+
## Copyright
113+
Copyright (c) 2015 Microsoft. All rights reserved.
114+
115+
116+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

0 commit comments

Comments
 (0)