argent_defender_ultra_api_email_screenshot.

Playback.EmailScreenshot(IN_szTo, IN_szCC, IN_szSubject, IN_szScreenshotFileName, IN_szBodyHTML)

Customers can use this function to send screenshots in their Recorded Sessions

Note: This function requires valid Email configurations, which customers can specify in the Email/SMTP tab in Settings (screen ID D5F)

If Email configurations are invalid, the Playback.EmailScreenshot function degrades gracefully and does nothing, and the rest of the Recorded Session should continue


“SMTP User Name” and “SMTP Password” can be blank if SMTP Authentication is not required

Let’s say Playback.EmailScreenshot is used right before the end of the Recorded Session as the last action — the screenshot taken should therefore show the final state of the last web page being loaded in the Recorded Session

Example:

Playback.EmailScreenshot(

‘IT@acme.com’,

‘CC@acme.com, Manager@acme.com’,

‘The Email Subject’,

‘SCREENSHOT.JPG’,

‘This is the Email Text’

);

IN_szTo Parameter

IN_szTo is expressed as a JavaScript String

This is the “To” Email recipient

Multiple recipients can be semi-colon or comma delimited

IN_szCC Parameter

IN_szCC is expressed as a JavaScript String

This is the “CC” Email recipient

Multiple recipients can be semi-colon or comma delimited

This parameter can be empty

(As in ” – to single quotes or two double quotes to represent an empty JavaScript String)

IN_szSubject Parameter

IN_szSubject is expressed as a JavaScript String

This is the Email Subject

Special variables can be used in this parameter

IN_szScreenshotFileName Parameter

IN_szScreenshotFileName is expressed as a JavaScript string

This is the file name of the screenshot

IN_szBodyHTML Parameter

IN_szBodyHTML is expressed as a JavaScript string

This is the body text of the Email

Plain text or HTML can be used

Special variables can also be used

Special Variables for Email Subject and Body

Special variables can be used in both the Email Subject and Body, and will be replaced with actual values when the Recorded Session runs

For example:

Playback.EmailScreenshot(

‘IT@acme.com’,

”,

‘Screenshot Of %SESSION% Taken On %DATE_TIME%‘,

‘SCREENSHOT.JPG’,

‘Screenshot of Recorded Session %SESSION% On Machine %MACHINE%

);

The available variables are as follows:

%DATE%

The date when the screenshot was taken, in “D MMM YYYY” format

Example: 4 July 2018

%DATE_TIME%

The date and time of when the screenshot was taken, in “D MMM YYYY HH:mm” format

Example: 4 July 2018 13:30

%MACHINE%

The machine name where the Recorded Session was run on

%URL%

The URL Object Definition Name of the Recorded Session

%REPLAY%

The Session Replay Name of the Recorded Session

%SESSION%

The Recorded Session Name of the Recorded Session