Send One E-mail

Operation Name

Send One E-mail

Function Overview

Send an email to Gmail SMTP server.

Properties

For details on using variables, refer to “Variables".
Basic Settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not Available Enter the name on the script canvas.  
Required Settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not Available Select Global Resources.
For details on global resource settings, refer to "Global Resource Properties (Destination)".
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Allows you to edit the global resource settings in "Edit resource list".
 
From Required Available Enter the email address of the sender.
  • Only the email address registered in "Send mail as" in the Gmail settings of the user can be used.
    If the email address you specified is not registered, the default email address is used as the source mail address.
To/Cc/Bcc Required - Enter the email address of the destination.

Each row can be operated using the following buttons.
  • [Add]:
    Add a row.
  • [Up]:
    Move the order of the selected row upwards by one.
  • [Down]:
    Move the order of the selected row downwards by one.
  • [Delete]:
    Delete a row.
 
To/Cc/Bcc / Category Required Available Select the type of destination.
  • [TO]: (default)
  • [CC]:
  • [BCC]:
 
To/Cc/Bcc / Mail Address Required Available Enter your email address.  
Authentication
Item name Required/Optional Use of variables Description Remarks
Authentication mode Required Not Available Select the authentication mode when sending mail.
  • [OAuth 2.0 AUTH]: (default)
    Perform OAuth 2.0 authentication.
  • [SMTP AUTH (LOGIN)]:
    Use SMTP AUTH (LOGIN) to authenticate the system.
User name Required Available Enter a user name to authenticate by SMTP AUTH or a user name to authenticate by OAuth 2.0 authentication.
  • Enter the value in either of the following formats: “<G Suite user name>” or “<G Suite user name>@<G Suite domain name>”.
Password Required Available Enter a Password for SMTP authentication.
  • Enabled when [SMTP AUTH (LOGIN)] is selected in [Authentication mode].
Authentication (Gmail OAuth 2.0) Required Not Available Select a global resource used for authentication.
For details on global resource settings, refer to "Global Resource Properties (OAuth 2.0)".
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Allows you to edit the global resource settings in "Edit resource list".
  • Enabled when [OAuth 2.0 AUTH] is selected in [Authentication mode].
Property Action
Item name Description Remarks
Authentication test
  • Perform authentication test by using selected [Authentication mode].
  • If the following happens, [Authentication test] is disabled.
    • When [SMTP AUTH (LOGIN)] is selected in [Authentication mode].
      • [User name] or [Password] are not entered.
      • A variable is specified in [User name] or [Password].
    • When [OAuth 2.0 AUTH] is selected in [Authentication mode].
      • When [User name] or [Authentication (Gmail OAuth 2.0)] is not entered.
      • A variable is specified in [User name].
Message
Item name Required/Optional Use of variables Description Remarks
Subject Optional Available Enter the subject.  
Message Optional Available Enter the text.  
Content-Type Optional Available Select or enter the Content-Type.
  • [text/plain]: (default)
  • [text/html]:
  • If omitted, the message is sent as "text/plain". The value of [Encoding] is set for the charset parameter.
Encoding Optional Available Select or enter type of encoding when sending mail.
  • [Japanese (JIS)]: (default)
  • [Japanese (Shift JIS)]:
  • [Japanese (EUC)]:
  • [US-ASCII]:
  • [ISO 8859-1]:
  • [UTF-8]:
  • [EUC-KR]:
When specifying the encoding directly in the field, use the encoding supported by Java SE Runtime Environment 8.
For details, refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).
  • If omitted sends in "UTF-8".
Attachments
Item name Required/Optional Use of variables Description Remarks
Attachments Optional - Specify attachment file paths.

Each row can be operated using the following buttons.
  • [Add]:
    Add a row.
  • [Up]:
    Move the order of the selected row upwards by one.
  • [Down]:
    Move the order of the selected row downwards by one.
  • [Delete]:
    Delete a row.
 
Attachments/File path Required Available Enter the attachment file path.
Reply-To
Item name Required/Optional Use of variables Description Remarks
Reply-To Optional - Specify the destination email address of a reply.

Each row can be operated using the following buttons.
  • [Add]:
    Add a row.
  • [Up]:
    Move the order of the selected row upwards by one.
  • [Down]:
    Move the order of the selected row downwards by one.
  • [Delete]:
    Delete a row.
 
Reply-To / Mail address Required Available Enter your email address.  
Header
Item name Required/Optional Use of variables Description Remarks
Header list Optional - Specifies a header to give when sending mail.  
Header list/Header Required Available Enter the key header to give when sending mail.
  • Double-byte key values are not supported.
Header list/Value Required Available Enter the value header to give when sending mail.
  • If the double-byte characters are included, the value is encoded according to RFC 2047 compliant encoding.
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not Available You can write a short description of this adapter.
The description will be applied to the specifications.
 

Schema

Input Schema

None

Output Schema

None

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count Returns the number of messages sent.
  • The default value is null.
message_category When an error occurs, the category of the message code corresponding to the error that occurred is stored.
  • The default value is null.
message_code When an error occurs, the code of the message code corresponding to the error that occurred is stored.
  • The default value is null.
message_level When an error occurs, the severity of the message code corresponding to the error that occurred is stored.
  • The default value is null.
error_type When an error occurs, the type of error that occurred is stored.
  • The default value is null.
  • Error type is in the following format.
    Example: "java.io.FileNotFoundException"
  • The contents to be stored may vary depending on the version of DataSpider Servista.
error_message When an error occurs, the error message of the error that occurred is stored.
  • The default value is null.
  • The contents to be stored may vary depending on the version of DataSpider Servista.
error_trace When an error occurs, the trace information of the error that occurred is stored.
  • The default value is null.
  • The contents to be stored may vary depending on the version and client applications of DataSpider Servista.

Grant charset parameter to attached file setting

If you send a text-format attachment file, the default encoding of the OS will be set to the charset parameters of Content-Type.
By setting up the following property, you can stop granting charset parameter to attached file's Content-Type.

Key Location Description Remarks
mail.mime.setdefaulttextcharset $DATASPIDER_HOME/server/conf/
system.properties
  • [true]:
    Grants default charset parameter if you attach text format file.
  • [false]:
    Does not grant default charset parameter if you attach text format file.
  • Default value is "true", and if you omit, "true" is set.

Specifications Limits

Major Exceptions

Exception Name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] or [Authentication (Gmail OAuth 2.0)] is not specified. Specify [Destination] or [Authentication (Gmail OAuth 2.0)].
ResourceNotFoundException
Resource definition is not found. Name : [<Global Resource name>]
The resource definition selected in [Destination] or [Authentication (Gmail OAuth 2.0)] is not found. Check the global resource specified in [Destination] or [Authentication (Gmail OAuth 2.0)].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify [<Property name>].
RecipientsNotFoundException [To/Cc/Bcc] is incorrect. Check the following.
  • [To/Cc/Bcc] that is configured with one or more
  • Whether [To/Cc/Bcc / Category] is correct
  • [Send / mail address] is entered.
  • [Send / mail address] does not contain any multi-byte characters.
java.io.UnsupportedEncodingException Encoding set to [Encoding] is not supported. Check the specified encoding in [Encoding].
javax.mail.AuthenticationFailedException: [User name] or [Password] is incorrect. Check [User name] or [Password].
com.sun.mail.util.MailConnectException: Failed to establish connection to Gmail SMTP server. Check the network reachability.
javax.mail.SendFailedException
Failed to send message. Check [Send / mail address] .
OAuth2AuthenticationFailedException
OAuth 2.0 authorization has failed.
[User name] or [Authentication (Gmail OAuth 2.0)] is invalid. Check [User name] or [Authentication (Gmail OAuth 2.0)].

Notes