Send Multiple E-mails

Operation Name

Send Multiple E-mails

Function Overview

Based on the contents of the input data, send mail to SMTP server.

Data Model

Data model of this type of component is table model type.

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.  
Input data Required Not Available Select the component 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".
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Allows you to edit the global resource settings in "Edit resource list".
 
Authentication
Item name Required/Optional Use of variables Description Remarks
Authentication mode Required Not Available Select the authentication mode when sending mail.
  • [None]:(default)
    Authentication is not performed.
  • [POP before SMTP]:
    Perform authentication to POP3 before sending.
  • [SMTP AUTH (LOGIN)]:
    Use SMTP AUTH (LOGIN) to authenticate the system.
  • [OAuth 2.0 AUTH]:
    Perform OAuth 2.0 authentication.
  • If [POP before SMTP] is selected, connection timeout for POP server is 15 seconds.
  • When [OAuth 2.0 AUTH] is selected, select [SSL/TLS] or [STARTTLS] for [SSL connection] of [Destination].
Host name Required Available Enter POP mail server host name or the IP address.
  • Enabled when [POP before SMTP] is selected in [Authentication mode].
Port number Required Available Enter the POP port number to access the mail server.
  • The default value is "110".
  • Enabled when [POP before SMTP] is selected in [Authentication mode].
User name Required Available Enter a user name to access to POP mail server or a user name to perform SMTP authentication or a user name to perform OAuth 2.0 authentication.
  • Enabled when [POP before SMTP], [SMTP AUTH (LOGIN)] or [OAuth 2.0 AUTH] is selected in [Authentication mode].
Password Required Available Enter a password for SMTP AUTH or to access to POP mail server.
  • Enabled when [POP before SMTP] or [SMTP AUTH (LOGIN)] is selected in [Authentication mode].
SSL connection Optional Not Available Select whether to make the SSL connection to POP mail server.
  • [Checked]:
    Make SSL connections.
  • [Not checked]: (default)
    Does not perform SSL connection.
  • Enabled when [POP before SMTP] is selected in [Authentication mode].
  • SSL/TLS is used for SSL connection method.
  • If [Checked] is selected, the certificate of the POP3 server must be imported to the keystore which DataSpider Servista is referring to.
  • For information regarding how to import to the keystore, refer to "Import of certificate".
Authentication (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].
  • Enabled when [POP before SMTP], [SMTP AUTH (LOGIN)] or [OAuth 2.0 AUTH] is selected in [Authentication mode].
  • If the following happens, [Authentication test] is disabled.
    • [POP before SMTP] or [SMTP AUTH (LOGIN)] is selected in [Authentication mode].
      • [Hostname], [Port number], [User name] or [Password] have not been entered.
      • A variable is specified in [Hostname] or [Port number], [User name], [Password].
    • When [OAuth 2.0 AUTH] is selected in [Authentication mode].
      • When [User name] or [Authentication (OAuth 2.0)] is not entered.
      • A variable is specified in [User name].
Transmission Setting
Item name Required/Optional Use of variables Description Remarks
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"(https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).
  • If omitted sends in "UTF-8".
Skip input data that cannot be sent Optional Not Available Select the operation to execute when data that cannot be sent is entered.
  • [Checked]:
    Messages that cannot be sent will be skipped and continue to process.
  • [Not Checked]: (default)
    An error occurs when the data that cannot be sent is entered.
  • If checked, when an error occurs when sending a message, the sending message process will be skipped and continue to process.
  • For connection errors that occur when a host that cannot be connected is specified, the error will persist even if this property is checked, because processing cannot continue.
  • Input data that cannot be sent is output into a log with the "WARN" log level.
Header
Item name Required/Optional Use of variables Description Remarks
Header list Optional - Specifies a header to give when sending mail.
  • Refer to Schema if you set the schema information for the header.
Header list/Header Required Available Enter the key header to give when sending mail.
  • Double-byte key values are not supported.
  • 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

<?xml version="1.0" encoding="UTF-8" ?>
 <table>
   <row>
     <column>Header 1</column>
     <column>Header 2</column>
       : 
     <column>From</column>
     <column>To</column>
     <column>CC</column>
     <column>BCC</column>
     <column>Reply To</column>
     <column>Subject</column>
     <column>Content-type</column>
     <column>Message</column>
     <column>Attachments</column>
   </row>
   <row>
     : </row>
 </table>
Column name Description Remarks
Header Specify for each key defined in the [Header List].
  • If a single key holds multiple values, specify them as a comma-delimited string (,).
  • No element occurs if nothing is specified in the [Header List].
From  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
To  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
CC  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
BCC  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
Reply-To  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
Subject    
Content-Type    
Message    
Attachments  
  • To specify multiple values, separate the values by using the delimiter character (i.e., semi colon (;) or comma (,)).
  • Specify the file path as an absolute path of the DataSpider file system.

Output Schema

None

Loading Schema on Mapper

Schema is loaded automatically.
For details, refer to "Edit Schema".

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 (OAuth 2.0)] is not specified. Specify [Destination] or [Authentication (OAuth 2.0)].
ResourceNotFoundException
Resource definition is not found. Name : [<Global Resource name>]
The resource definition selected in [Destination] or [Authentication (OAuth 2.0)] is not found. Check the global resource specified in [Destination] or [Authentication (OAuth 2.0)].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify [<Property name>].
InvalidSchemaException [Input data] is not a valid schema. Check the schema of [Input data].
RecipientsNotFoundException The receiver specified in [Input data] is invalid. Check the following.
  • A receiver is specified in [Input Data].
  • The receiver address specified in [Input Data] does not contain any multi-byte characters.
SenderNotFoundException No sender is specified in [Input data]. Check whether the sender has been specified in [Input data].
InvalidMailAddressException
<sender> is an invalid email address.
The sender specified for [Input data] is invalid. Check that the sender specified for the [Input data] is valid.
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:
ConnectException
[Hostname] failed to connect to the specified host. Check [Hostname] and [Port number]. Check whether services are provided in the specified host specified in [Hostname].
com.sun.mail.util.MailConnectException:
UnknownHostException
[Hostname] not found. Check the host name specified with [Hostname].
javax.mail.SendFailedException
Failed to send message. Check that To, CC, and BCC for the [Input data] are correct.
javax.mail.SendFailedException
Invalid Addresses
Failed to send message. Check that To, CC, and BCC for the [Input data] are correct.
If the email address is correct, this exception may occur when the mail server returns an error.
com.sun.mail.smtp.SMTPSendFailedException Failed to send message. Check the message and take appropriate measures.
javax.mail.MessagingException:
SSLHandshakeException
It occurs when selected [SSL/TLS] or [STARTTLS] in [SSL Connection] in global resource properties.The reason is that the server certificate registered in Java is different from the one that is used to SSL connection,so the validity cannot be verified. Check if the server certificate is registered in JAVA when connecting to SSL server. If registered,check that the server is the same as the one registered in JAVA and check whether the server certificate has expired.
OAuth2AuthenticationFailedException
OAuth 2.0 authorization has failed.
[User name] or [Authentication (OAuth 2.0)] is invalid. Check [User name] or [Authentication (OAuth 2.0)].