# Outlook Signature Injector Add-In

This folder contains a basic Outlook Web Add-in that fetches an employee's email signature from the TAF ERP API and inserts it into the compose window.

## Deployment

1. Host the files in this folder on a publicly reachable HTTPS endpoint.
2. Upload `manifest.xml` to the Microsoft 365 admin center for central deployment.
3. Users will see **Insert Signature** and **Refresh Signature** buttons in the ribbon while composing a message.

## How it works

The add-in calls `/api/signatures/byEmail/{email}` to retrieve the HTML signature generated by `EmailSignatureGenerator`. The response is injected into the body using the Office.js `setSelectedDataAsync` API. When you click **Refresh Signature**, the signature is fetched again and stored in the browser's `localStorage`. The cached signature is automatically inserted whenever a new message or reply is composed.
