REFERENCE
U.SEND_EMAIL
Summary
Sends email with selected data and any specified attachments to specified recipients
Syntax
=U.SEND_EMAIL(to, subject, body, [from], [cc], [bcc], [throttle], [plain_text], [attachments], [block])
Parameters
| Parameter | Required | Description |
|---|---|---|
to |
Yes | Email addresses to which email will be sent. Addresses can be in distinct cells and/or separated by a comma, colon, blank space or newline. Set to TRUE to have a report with details of emails sent by the current process returned |
subject |
Yes | Subject of the email message. Email message must have a subject, a body or both |
body |
Yes | Body of the email message. Is HTML by default, so formatting and any charts in selected range will be included. If multiple ranges are selected in this parameter, content from them is stacked vertically in the email. Email message must have a subject, a body or both |
[from] |
No | The "From" address in the email message. Required if Microsoft Outlook is not installed and configured, but can also be used when multiple accounts are configured in Outlook. If any email address is "quit()" then a flag is set such that Outlook (if used) will be closed when the Excel instance is closed; an address of "quit(false)" reverts the flag if set |
[cc] |
No | Email addresses that will be cc'd |
[bcc] |
No | Email addresses that will be bcc'd |
[throttle] |
No | The time in seconds that must elapse before U.SEND_EMAIL from the calling range of cells will be allowed to resend an email. Default is 60 seconds; if zero or negative then no throttling is applied. If set to TRUE and Outlook is used then email window is displayed to the user. If 2 columns are provided and 2nd value is FALSE, the email is not sent. |
[plain_text] |
No | If set to TRUE then body of email will be plain text instead of HTML. If multiple body ranges are selected, a comma-delimited list of range numbers can optionally be provided and only those will be added to the email as plain text; if a colon and a positive integer are appended to any specified page number, the integer will set the max width of the text (e.g. "2:150" would make page 2 plain text and limit its width to 150 pixels). Include FALSE explicitly to have email send fail if HTML or specified attachment is not generated |
[attachments] |
No | The list of files (full file paths) that will be attached to email. Entries in the form of "make_file( |
[block] |
No | If set to TRUE then method will not be calculated unless triggered by user interaction or calculated as a step in a script; If set to a number then will be throttled to not calculate more frequently than the specified number of seconds; make number negative to prevent auto recalc of blocked methods |
Behavior
The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.
Return Value
Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.
Examples
Notes
- Formula examples are preserved from maintained workbook usage and normalized to the current
U.prefix. - Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
- Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
- For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.
Related
- Concept: Workbook Automation
- How-to: Respond to Clicks and Notifications
- Example: Click-Driven Script