Home
EmailSender
includeAndEvaluate(Object filename)
Evaluates GAS scriptlets and includes HMTL from a file. *just shortcut a for a long command
Arguments:
| Name | Type | Description |
|---|---|---|
| filename | Object |
name of file to be included |
Return Values:
| Type | Description |
|---|---|
string |
string of result html |
initialize()
Init clients array to manager
getProp(Object prop)
Wrapper function.
Arguments:
| Name | Type | Description |
|---|---|---|
| prop | Object |
processClients(Object formObject)
prepares sheets for clients and sends emails
Arguments:
| Name | Type | Description |
|---|---|---|
| formObject | Object |
form with emails and message |
Return Values:
| Type | Description |
|---|---|
string |
success string |
setRuntimeProperties(Object params)
Sets runtime properties
Arguments:
| Name | Type | Description |
|---|---|---|
| params | Object |
object with properties to set |
processForm(Object formObject)
Processes form and returns result.
Arguments:
| Name | Type | Description |
|---|---|---|
| formObject | Object |
Form object |
Return Values:
| Type | Description |
|---|---|
Object |
object which designates success or failure |
preparePayloadAndEmail(Object email, Object body, Object mainSheetData, Object mainSS, Object payloadSS, Object mainSheet, Object payloadSheet, Object payloadAsFile)
prepares sheets for clients and sends emails
Arguments:
| Name | Type | Description |
|---|---|---|
Object |
email address | |
| body | Object |
body of email |
| mainSheetData | Object |
data to insert into sheet |
| mainSS | Object |
main SpreadSheet resource |
| payloadSS | Object |
SpreadSheet for email attachment |
| mainSheet | Object |
main sheet resource |
| payloadSheet | Object |
sheet for email attachment |
| payloadAsFile | Object |
link to drive for email attachment |
Return Values:
| Type | Description |
|---|---|
string |
success string |
createPresentableHTML(Object content, Object sourceType, Object title)
Creates presentable HTML for a browser *cannot be run from library, becaouse of filename
Arguments:
| Name | Type | Description |
|---|---|---|
| content | Object |
depends on a sourceType, if sourceType isn't string, it includes file with name == content |
| sourceType | Object |
is string indicating values 'string'/'file' for source type, takes file as default for any other value |
| title | Object |
title of a window |
Return Values:
| Type | Description |
|---|---|
Object |
html object |
include(Object filename)
Includes HMTL from a file. *just shortcut a for a long command
Arguments:
| Name | Type | Description |
|---|---|---|
| filename | Object |
name of file to be included |
Return Values:
| Type | Description |
|---|---|
string |
string of html |
doGet(Object e)
Serves HTML
Arguments:
| Name | Type | Description |
|---|---|---|
| e | Object |
url parameters setting this webapp's beahviour |
Return Values:
| Type | Description |
|---|---|
Object |
HTML page with javascript |