--- title: "Output Action EmailAction" slug: "output-action-emailaction" tags: ["reference", "dox42 Server V5.0.2.6"] updated: 2025-08-04T10:12:22Z published: 2025-08-04T10:12:22Z canonical: "help.dox42.com/output-action-emailaction" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.dox42.com/llms.txt > Use this file to discover all available pages before exploring further. # Output Action EmailAction This Output Action sends the generated document via e-mail. ## Parameters Note The parameter names of the Output Actions are not case-sensitive. All parameter names may contain data fields (exceptions are described in the relevant parameters). Example: ` FileName = "Application_<%Citizen.Name%>.pdf"` > [!NOTE] > Note > > To use an alias with an email address, use this syntax: `MyCompany Sales {sales@mycompany.com}` > > The syntax `MyCompany Sales <sales@mycompany.com>` would work as well, but might cause an error if used with the REST Service. | **Parameter** | **Requirement** | **Description** | | --- | --- | --- | | Mode | optional | Allows to configure whether the generated document should be used as the body of a txt or html e-mail or attached to the e-mail. Possible Values: - `TxtEMail` - `HtmlEMail` - `AttachmentTxtBody` - `Attachment` (default) Use `TxtEMail` and `HtmlEMail` only with `GenerateDocument`. | | `FileName` | mandatory, if `Mode = Attachment`, otherwise ignored | Defines the name of the document, which will be attached. The extension will define the file format (.docx, .xlsx, .pptx, .pdf, .html, …). | | `SpecialFormat` | optional | Specifies a special format (dox42 Server For Documents only): - When generating a PDF: - `PDFA1b` - `PDFForm`(Form fields are preserved in the PDF). - When generating HTML: - `HTMLCode`: this will cause the text of the generated document to be interpreted in HTML code. | | `Sign` | optional | The format PDF may bear a digital signature (dox42 Server For Documents only). Certificate and corresponding password have to be defined in the **web.config** file. Value: `true` | | `Receiver` | mandatory | Specifies the e-mail address of the receiver. Multiple e-mail addresses need to be separated with a comma or semicolon. | | `ReceiverCC` | optional | Specifies the e-mail address of carbon copy receiver. Multiple e-mail addresses need to be separated with a comma or semicolon. | | `ReceiverBCC` | optional | Specifies the e-mail address of blind carbon copy receiver. Multiple e-mail addresses need to be separated with a comma or semicolon. | | `Sender` | optional | Specifies the e-mail address of the sender. If not specified, the address stated in the **web.config** file will be used. | | `MailServerUsername` | optional | May be specified along with Sender if a different login for the mail server is required. | | `SenderPassWord` | mandatory, if Sender or `MailServerUsername` are specified | Specifies the password for the sender’s email account or MailServerUsername on the e-mail server, configured in the **web.config** file. | | `Header` | mandatory | Specifies the e-mail subject. | | `Body` | optional | Specifies the e-mail text (`Mode = Attachment` only). | | `HtmlBody` | optional | Send the e-mail text as HTML (`Mode = Attachment` only). | | `BodyTemplate` | optional | Specifies the dox42 Word template to generate the e-mail body. The template must use the same data map as the attachment. (`Mode = Attachment` only) `Mode = AttachmentTxtBody `generates the body template in txt format. | | `StaticAttachment1.Path` | optional (or use `StaticAttachment1.Base64`) | Allows sending for static attachments and provides the document’s path. It is possible to send any number of attachments, like: `StaticAttachment2… StaticAttachment3…` Example: `C:\Images\MyImage.jpg` | | `StaticAttachment1.Base64` | optional (or use `StaticAttachment1.Path`) | Allows sending for Base64 encoded attachments. It is possible to send any number of attachments, like: `StaticAttachment2`… `StaticAttachment3`… | | `StaticAttachment1.Name` | mandatory, if `StaticAttachment1.Base64` is used | Specifies the name of a Base64 encoded attachment. Example: `MyImage.jpg` | | `MailServer` | optional | Specifies a different mail server than configured in your **web.config** file. | | `MailServerPort` | optional | Changes the SMTP mail server port. You may want to use the standard ports 25 or 587. | | `SSL` | optional | Values: `true` or `false` | | `SaveMSGFile` | mandatory if `SendMode=save`,otherwise optional | Specifies the file path to save the sent e-mail as msg file. Example: `C:\Windows\Temp\Order_<%http://Customer.ID %>.msg` | | `SendMode` | optional | Values: - `send`: Default, send e-mail immediately - `save`: Don’t send e-mail, but save it as draft to the path defined in SaveMSGFile. - `return`: Don’t send e-mail, but return the e-mail as draft in the ReturnMessage. When using save, **SaveMSGFile** must be specified. | | `MailMethod` | optional | Specfies a a specific method to send your dox42 e-mails. Possible values: - `exchangeonline`: You need to use this value, if you send e-mails via Microsoft Exchange Online. - `aspose` - `mailkit` - `onmailkiterrortryaspose` - `onasposeerrortrymailkit`: When the Aspose Mail Method throws an error, the mailkit method is used to send dox42 e-mails. When adding the `MailMethod` parameter you may also want to add the `MailServerPort` parameter in your **web.config** file, if you have not done so yet. | | `AzureADAppId` | optional | Specifies the application ID of the app registration that has the necessary API permissions configured to send e-mails via Exchange Online (can be configured in the **web.config** file or dox42 MAUI as well). | | `AzureADTenantId` | optional | Specifies the tenant ID in which the above app registration is configured to send e-mails via Exchange Online (can be configured in the **web.config** file or dox42 Management UI (MAUI) as well). | | `AzureADClientSecret` | optional | Specifies the client secret that is associated with the App ID to send e-mails via Exchange Online vcan be configured in the **web.config** file or dox42 Management UI (MAUI) as well). | | `ExchangeOnlineUrl` | optional | Comes with the default value `https://outlook.office365.com/EWS/Exchange.asmx `and can be left empty. | | `Condition` | optional | If `value =false`, the Output Action will not be performed. |