---
title: Open an e-mail compose window from the browser
summary: "Registers a client-side mailto: window.open call with sanitized recipient and subject text."
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Core.Infragistics111
reference_type: package
operation_id: OP-CORE-008
trigger: Consuming page action
---

# Open an e-mail compose window from the browser

This operation registers client-side script that opens the user's default e-mail client via a `mailto:` URL, sanitizing recipient and subject text before they are placed in the URL.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-CORE-008 |
| **Trigger** | Consuming page action |
| **Inputs** | Recipient, optional CC, subject, body |
| **Outputs** | Registered client script that opens a `mailto:` window |
| **Primary components** | `AppViewPageBase.OpenEmailPopup`, `AppViewPageBase.OpenEmailScriptManager` |
| **Entry point** | `SAIF.Presentation.Web.Core.Infragistics111/AppViewPageBase.aspx.vb` |

## Steps

1. Sanitize the recipient and subject via `Utilities.clsStringUtilities.CleanForEmail`. ([BR-CORE-025](../business-rules.md#br-core-025-recipient-and-subject-text-are-sanitized-before-being-placed-in-a-mailto-url))
   - > **Origin**: Sanitization logic is implemented in [Clean text for output](clean-text-for-output.md) (`SAIF.Presentation.Web.Core.Infragistics111`, this library).
   - Note: the body sanitization call is commented out in source and is therefore not active.*
2. Format the `mailto:` string:
   - If no CC was supplied: `mailto:{0}?subject={1}&body={2}`.
   - If a non-empty CC was supplied: `mailto:{0}?cc={1}&subject={2}&body={3}`. ([BR-CORE-026](../business-rules.md#br-core-026-a-cc-recipient-is-included-in-the-mailto-link-only-when-a-non-empty-cc-value-is-supplied))
3. Register the resulting `window.open(...)` script:
   - Via `ClientScript` for the popup variant (`OpenEmailPopup`).
   - Via `ScriptManager.RegisterClientScriptBlock` for the partial-postback variant (`OpenEmailScriptManager`).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Consuming page action]) --> S1[CleanForEmail: sanitize recipient and subject]
	S1 --> S2{Non-empty CC supplied?}
	S2 -->|Yes| S3["Format mailto: with cc="]
	S2 -->|No| S4["Format mailto: without cc="]
	S3 --> S5{Popup or partial-postback variant?}
	S4 --> S5
	S5 -->|Popup| S6[Register via ClientScript]
	S5 -->|Partial postback| S7[Register via ScriptManager.RegisterClientScriptBlock]
```

## Failure and edge-case behavior
- Body text is not sanitized (the sanitization call for body is commented out), so body content placed in the `mailto:` URL is not passed through `CleanForEmail`.*
- Neither overload validates that the recipient is a well-formed e-mail address before building the `mailto:` string.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Presentation.Web.Core.Infragistics111/AppViewPageBase.aspx.vb`
