> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-workbench-java-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-workbench-java-sdk/json-1.md).

# EmailApi (Email APIs)

## sendEmail

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

```
EmailApi.sendEmail(String appName, String email, String subject, String content,
      String template, String fromAlias, Map<String, Object> templateParams)
or

EmailApi.sendEmail(String appName, String email, String subject, String content,
      String template, String fromAlias, Map<String, Object> templateParams, String senderEmail)
or
EmailApi.sendEmail(final String toEmail, final String subject, String content)
or 
EmailApi.sendEmail(final String toEmail, final String template,
      final Map<String, Object> emailParams, final String subject)
```

parameters:

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

Return:

```
result of the operation​
```

## sendEmailMarkDownContent

Send email with markdown contents.

```
EmailApi.sendEmailMarkDownContent(String mailTo, String body, String subject)
```

parameters:

```
mailTo:    recipient address
body:      body with markdown
subject:   subject of the email
```

Return:

```
result of the operation​
```

## sendEmailUsingFunction

Send email using the function

```
EmailApi.sendEmailUsingFunction(String functionName,
      Map<String, Object> emailParams)
```

parameters:

```
functionName
emailParams
```

Return:

```
boolean
```

## getSubject

Get subject

```
EmailApi.getSubject(String templateName, String defaultSubject,
      Map<String, Object> emailParams)
```

parameters:

```
templateName
defaultSubject
emailParams
```

Return:

```
String
```

## getProcessedEmailContentFromTemplate

get processed email content from template

```
EmailApi.getProcessedEmailContentFromTemplate(String templateName,
      Map<String, Object> emailParams)
```

parameters:

```
templateName
emailParams
```

Return:

```
String
```

## emailTemplateExists

check if the email template exits

```
EmailApi.emailTemplateExists(String templateName)
```

parameters:

```
templateName
```

Return:

```
boolean
```

## getEmailProps

get email props

```
EmailApi.getEmailProps(String templateName)
```

parameters:

```
templateName
```

Return:

```
Map<String, Object>
```

## getServerName

get server name

```
EmailApi.getServerName()
```

parameters:

```
None
```

Return:

```
String
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench-java-sdk/json-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
