Trillo Workbench Python SDK
  • Introduction
    • Sample Example
  • BaseApi (Basic APIs)
  • LogApi (Logging APIs)
  • DSApi (Database APIs)
    • Overview
    • Retrieve APIs
    • Create and Update API
    • Delete APIs
    • Empty Table
    • Sample Functions Using API
  • FuncApi (Function APIs)
  • TaskApi (Task APIs)
  • CacheApi (Memory Cache APIs)
    • Delete APIs
    • Create and Update API
    • Retrieve APIs
  • StorageApi
  • CallLogger (Logging Level APIs)
  • CommandApi
  • OAuth1Api
  • Google Cloud APIs
    • BigQueryApi (BigQuery APIs)
    • GCSApi (Cloud Storage APIs)
    • GCPAuthApi
    • GCPRestApi
    • GCPTokenInfo
  • Metadata API (MetaApi)
    • Create and Update API
    • All Retrieve-Only
  • UMApi (User, Tenant, Roles APIs)
  • HttpApi (HTTP APIs)
  • SFTPApi
  • FileUtil
  • CSVApi
  • EmailApi (Email APIs)
  • DLPApi
  • DocApi
  • FolderApi
  • GCPGenApi
  • Util
Powered by GitBook
On this page
  • sendEmail
  • sendEmailMarkDownContent
  • sendEmailUsingFunction
  • getSubject
  • getProcessedEmailContentFromTemplate
  • emailTemplateExists
  • getEmailProps
  • getServerName

EmailApi (Email APIs)

sendEmail

Send email to recipient via the internally provision gateway of the workbench.​

EmailApi.sendEmail(appName, email, subject, content,
      template, fromAlias, templateParams)
or

EmailApi.sendEmail(appName, email, subject, content,
      template, fromAlias, templateParams, senderEmail)
or
EmailApi.sendEmail(toEmail, subject, content)
or 
EmailApi.sendEmail(toEmail, template,
      emailParams, subject)

parameters:

appName:     name of the internal application (string)
email:       email of the sender (string)
subject:     subject of a email (string)
content:     contents (string)
template:    template to be used  (string)
fromAlias:   alias name   (string)
templateParams:   template parameters (dictionary)
senderEmail:      sender email (string)
toEmail:     to email (string)
emailParams : email params (dictionary)

Return:

A Result object indicating the success or failure of the email sending operation.

sendEmailMarkDownContent

Send email with markdown contents.

EmailApi.sendEmailMarkDownContent(mailTo, body, subject)

parameters:

mailTo:    recipient address (string)
body:      body with markdown (string)
subject:   subject of the email (string)

Return:

A Result object indicating the success or failure of the email sending operation.

sendEmailUsingFunction

Send email using the function

EmailApi.sendEmailUsingFunction(functionName,
      emailParams)

parameters:

functionName (string)
emailParams (dictionary)

Return:

boolean

getSubject

Get subject

EmailApi.getSubject(templateName, defaultSubject,
      emailParams)

parameters:

templateName (string)
defaultSubject (string)
emailParams (dictionary)

Return:

String

getProcessedEmailContentFromTemplate

get processed email content from template

EmailApi.getProcessedEmailContentFromTemplate(templateName,
      emailParams)

parameters:

templateName (string)
emailParams (dictionary)

Return:

String

emailTemplateExists

check if the email template exits

EmailApi.emailTemplateExists(templateName)

parameters:

templateName (string)

Return:

boolean

getEmailProps

get email props

EmailApi.getEmailProps(templateName)

parameters:

templateName (string)

Return:

Dictionary

getServerName

get server name

EmailApi.getServerName()

parameters:

None

Return:

String
PreviousCSVApiNextDLPApi

Last updated 1 year ago