# Report Format & E-Mail Transport

The module adds to Document Exchange:

- the **Report** exchange format, which prints a document with the report set up in the report selections and saves it as a PDF file;
- the **E-Mail** exchange transport, which sends the PDF files by e-mail to the recipients of the document.

Combining them in a profile lets you send purchase orders, posted sales invoices, posted sales shipments, posted sales credit memos and issued reminders by e-mail, one at a time or in batches, directly from the lists and cards.


1. Search for **Document Exchange Profiles** and create a new line.
2. In **Exchange Format** choose **Report**.
3. In **Exchange Transport** choose **E-Mail**.
4. Enable the profile.

Make sure that a report is set up in the report selections for each document type you want to send, and that e-mail accounts are set up (you can assign specific accounts to the purchase order, purchase quote, sales order, sales invoice, sales credit memo and reminder e-mail scenarios).


| Field | Description |
|---|---|
| **E-Mail Address Source** | Defines where the recipient addresses of purchase documents are taken from: **Buy-from** (buy-from contact or vendor) or **Pay-to** (pay-to contact or vendor). |


1. Open one of these pages: **Purchase Order** or **Purchase Orders**, **Posted Sales Invoices**, **Posted Sales Shipment**, **Posted Sales Credit Memos**, **Issued Reminder** or **Issued Reminders**.
2. Select the documents to send.
3. Choose the **Document Exchange** action.
4. Choose one of the options offered by the profile:
   - **Send <document> via E-Mail**: sends the selected documents;
   - **Send <document> via E-Mail (batch)**: sends the selected documents as a batch.

A progress window shows the percentage of documents processed. Each document is sent in a separate e-mail with its own PDF attached.


- **Attachment name**: the PDF file is named after the document type followed by the document number (for issued reminders the prefix is "Reminder").
- **Recipients**:
  - purchase orders: the e-mail addresses of the buy-from or pay-to contact (according to **E-Mail Address Source**); if missing, the e-mail of the vendor;
  - posted sales invoices and credit memos: the e-mail addresses of the bill-to contact; if missing, the e-mail of the bill-to customer;
  - posted sales shipments: the e-mail addresses of the sell-to contact; if missing, the e-mail of the sell-to customer;
  - issued reminders: the e-mail of the customer.

  For contacts, both e-mail addresses of the contact are used.
- **Language**: the e-mail text is chosen in the language of the contact, customer or vendor.
- **Subject, body, CC and BCC**: they are taken from the report custom text with the **EMAIL** key for the report used, in the recipient's language. In the body you can use the placeholders `#salutation#` (formal salutation of the contact) and `#username#` (full name of the user sending the e-mail).
- **Sent counter**: after sending, the **No. E-Mail Sent** field of the document is increased by one (purchase orders, posted sales invoices, posted sales credit memos and issued reminders).
- If the document has no recipients, sending stops with the "No recipients" error.