Go to Scriptcase store

# Grid Export Email

In this menu, the service used to send emails will be defined in the Sending Settings block, as well as the body of the emails that will be sent in the Export Settings block.

> To use this resource, it is necessary that the fields for exporting by e-mail are enabled in the application’s toolbar.

## Sending settings

In this block we must define the sending service that will be used in the application. This service must be defined in the API attribute by selecting a Pre-configured API or selecting the Custom option that must be configured in the application.

> This option allows you to select only one delivery service for the application. For the dynamic definition of the service it is necessary to use the macro sc_send_mail_api.

### API

This attribute defines the service that will be used by the application to send emails.

The developer chooses between selecting one of the listed Email sending APIs or the Custom option that allows configuring a sending service in the application itself.

#### Pre-configured APIs

If there are one or more email APIs configured and active, they will be listed and categorized according to the access level at which they were created.

> Access Levels

> - Public: Available to all users on all projects.
> - Project: Only available in the project in which it was created.
> - User: Only available to the user who performed the API configuration.

It is also possible to configure a new API or edit an existing one by clicking on the icon , that opens API configuration screen.

The icon is responsible for updating the list of APIs in the attribute by refreshing the field, allowing the new configured APIs to be displayed without the need to reload the page.

#### Custom

When selecting this option, the configuration fields will be displayed below the API Attribute, in this case, it is not necessary that there is an API configured in the Tools > API menu.

The developer must configure the sending service using the displayed fields according to the selected Gateway.

Scriptcase connects to three different APIs for sending emails: SMTP, Mandrill, and Amazon SES.

### SMTP Configuration

SMTP is the standard protocol for sending e-mails over the Internet, and each provider has its SMTP.

> For more information about SMTP settings click here

#### API

It allows you to select an API already configured in Tools > API or set a new one here by selecting - custom -. In this case, you see some options according to the selected Gateway.

> To use an API in a published project, it is necessary to perform the Configuration of this API in the production environment, in the API menu.

#### Gateway

Select the way to send the email. The SMTP is the default protocol for sending e-mails over the Internet, and each provider has its SMTP.

#### SMTP Server

SMTP server address for the provider.

#### Port SMTP

Port used by the mail server. Use port 465 for security with SSL, port 587 for security with TLS, or port 25 as port without security. By omitting the value, Scriptcase defaults to 25.

#### User SMTP

SMTP server user.

#### Enter SMTP

SMTP server user password.

#### Protocol SMTP

Defines the security protocol. By omitting the value, Scriptcase uses the default value.

#### E-mail

Enter the origin email, that is the email sender.

#### Name

The sender’s name displayed in the email.

### Mandrill Configurations

Mandrill is a transactional email API for MailChimp users, ideal for sending data-driven emails.

#### API

It allows you to select an API already configured in Tools > API or set a new one here by selecting - custom -. In this case, you see some options according to the selected Gateway.

> To use an API in a published project, it is necessary to perform the Configuration of this API in the production environment, in the API menu.

#### Gateway

Select the way to send the email. Mandrill is a transactional email API for MailChimp users, ideal for sending data-driven emails.

#### API KEY

Enter the key obtained from the origin site of your API.

#### E-mail

Enter the origin email, that is the email sender.

#### Name

The sender’s name displayed in the email.

> For more information about mandrill

### Amazon SES Configurations

Amazon Simple Email Service Amazon SES is an email sending service designed to assist in sending marketing emails, notifications, and transactional messages.

> To use an API in a published project, it is necessary to perform the Configuration of this API in the production environment, in the API menu.

#### API KEY

Enter the key obtained from the origin site of your API.

#### API Secret

Enter the secret access key of your account.

#### Region

Amazon SES has endpoints in many countries, to reduce network latency, inform the region of the endpoint closest to your application. See the regions.

#### E-mail

Enter the origin email, that is the email sender.

#### Name

The sender’s name displayed in the email.

> For more information about Amazon SES

## Export Settings

It allows the definition of the default values of the interface for sending e-mails used by the end user of the application.

#### To

Set the default value for the field in the application’s end-user email sending interface.

Whether or not to inform a default value for the field is the choice of the developer, who can choose to activate the empty attribute, use a global variable or inform a fixed text.

> Whether using the variable or fixed text in the field, if you choose to inform more than two e-mails, they must be separated by , or ;.

###### Empty attribute

When choosing not to inform a value, the developer forces the user to inform one or more destination e-mails.

###### Global variable

In this case, just add the variable to the value of the attribute containing the field’s default email list.

###### fixed text

The developer can define one or more default emails directly in the attribute without using a variable.

##### Example of displaying the (To) field in the email sending user interface

Below is an example of how the emails defined by the developer will be displayed on the sending screen to the application user. In this screen the user can remove the default values previously defined by the developer by clicking on X or can add new emails to the field.

#### It has copy

Defines the behavior of the Copy (cc) attribute in the submission screen used by the end user.

It has three possible configurations:

###### No

In this case the Copy (cc) attribute will not be available in the application, making it impossible to send emails with Copy(cc).

###### Yes

Neste caso o atributo Cópia (cc) estará disponível na aplicação para a configuração do desenvolvedor e na interface de envio de e-mail do usuário.

###### Hidden

In this case the Copy (cc) attribute will be available only for the developer configuration. The Copy (cc) field will not be displayed on the user’s email sending interface screen, thus making it impossible to change the default values defined by the developer.

In this case, the email will always be sent with a copy to the emails configured by the developer.

#### Copy (CC)

Set the default value for the field in the application’s end-user email sending interface.

Whether or not to inform a default value for the field is the choice of the developer, who can choose to activate the empty attribute, use a global variable or inform a fixed text.

> Whether using the variable or fixed text in the field, if you choose to inform more than two e-mails, they must be separated by , or ;.

###### Empty attribute

When choosing not to inform a value, the developer forces the user to inform one or more destination e-mails.

###### Global variable

In this case, just add the variable to the value of the attribute containing the field’s default email list.

###### fixed text

The developer can define one or more default emails directly in the attribute without using a variable.

#### It has blind carbon copy (bcc)

Defines the behavior of the Copy (cc) attribute in the submission screen used by the end user.

It has three possible configurations:

###### No

In this case the Copy (cc) attribute will not be available in the application, making it impossible to send emails with Copy(cc).

###### Yes

Neste caso o atributo Cópia (cc) estará disponível na aplicação para a configuração do desenvolvedor e na interface de envio de e-mail do usuário.

###### Hidden

In this case the Copy (cc) attribute will be available only for the developer configuration. The Copy (cc) field will not be displayed on the user’s email sending interface screen, thus making it impossible to change the default values defined by the developer.

In this case, the email will always be sent with a copy to the emails configured by the developer.

#### Blind carbon copy (BCC)

Set the default value for the field in the application’s end-user email sending interface.

Whether or not to inform a default value for the field is the choice of the developer, who can choose to activate the empty attribute, use a global variable or inform a fixed text.

> Whether using the variable or fixed text in the field, if you choose to inform more than two e-mails, they must be separated by , or ;.

###### Empty attribute

When choosing not to inform a value, the developer forces the user to inform one or more destination e-mails.

###### Global variable

In this case, just add the variable to the value of the attribute containing the field’s default email list.

###### fixed text

The developer can define one or more default emails directly in the attribute without using a variable.

#### Subject

Sets the default value for the field in the application’s end-user email sending interface.

The developer can choose to define a default value using global variable, lang variable, informing a fixed text or can choose not to define a default text leaving the attribute empty.

> The default value defined by the developer can be changed by the application user.

##### Subject attribute configuration example

##### Subject field example in User interface

#### Body

Sets the default value for the field in the application’s end-user email sending interface.

The developer can choose to define a default value using global variable, lang variable, informing a fixed text or can choose not to define a default text leaving the attribute empty.

> The default value defined by the developer can be changed by the application user.

##### Subject attribute configuration example

##### Subject field example in User interface

#####

#####