Send Multiple E-mails

Operation Name

Send Multiple E-mails

Function overview

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

Data Model

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

Properties

For information about 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
Connection Required Not available Select Global Resources.
Refer to "Global Resource Properties" for global resource settings .
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be managed from "Edit Resource list".
 
Authentication
Item name Required/Optional Use of Variables Description Remarks
User name Required Available Enter a user name for SMTP authentication.
  • Enter a user name as the form of "<User name on Google Apps>@<Domain name on Google Apps>".
Password Required Available Enter a Password for SMTP authentication.  
Property Action
Item name Description Remarks
Authentication test Performs authentication test with [User name] and [Password].
  • If the following happens, [Authentication test] is disabled.
    • [User name] or [Password] are not entered.
    • Values specified in [User name] and or [Password] are script variables.
Transmission settings
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]:
Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details .
  • If omitted sends in "UTF-8".
Skip input data that cannot be sent Optional Not available Selects the operation when data is entered can not be sent.
  • [Checked]:
    Messages that cannot be sent will be skipped and continue to process.
  • [Not Checked]: (default)
    When data is entered can not be sent, error occurs.
  • If checked, when an error occurs when sending a message, skip the message and continue.
  • Connection error remains an error when specified the host that cannot be connected because process cannot continue even though the property have been checked.
  • Input data that cannot be send is output into log with 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 of header to give when sending mail.
  • Double-byte key value is 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 reflected in the specifications.
 

Schema

Input Schema

<?xml version="1.0" encoding="UTF-8" ?>
 &lt;table&gt;
   &lt;row&gt;
     <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>
   &lt;/row&gt;
   &lt;row&gt;
     :
   &lt;/row&gt;
 </table>
Column name Description Remarks
Header The element occurs for each key specified in the [Header list].
  • If a single key holds multiple values, they are represented as a comma-delimited string.
  • No element occurs if nothing is specified in the [Header list].
From  
  • Enter a user name as the form of "<User name on Google Apps>@<Domain name on Google Apps>".
    If the specified email address is not registered to the "Send mail as", the default email address on Gmail is used.
To  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Cc  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Bcc  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Reply To  
  • If there are multiple values specified, they are represented as a comma-delimited string.
Subject    
Content-type    
Message    
Attachments  
  • If there are multiple values specified, they are represented as a comma-delimited string.
  • Please specify the absolute path of the DataSpider file system as the file path.

Output Schema

None.

Loading schema in Mapper

Schema is loaded automatically.
See "Edit Schema"for any details .

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 value defaults to null.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Grant charset parameter to attached file setting

If you send text format attached file, default encoding of OS will be set to charset parameter 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" will be set.

Specification Limits

Main exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Connection] is not specified. Please specify [Connection].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Connection] is not found. Please check the global resource specified in [Connection].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
InvalidSchemaException [Input data] is not valid schema. [Input data] Please check the schema.
RecipientsNotFoundException The recipients in the [Input data] are invalid. Check the following.
  • [Input data] Please confirm whether the destination is specified.
  • The email addresses of the recipients in the [Input data] includes multi-byte characters.
SenderNotFoundException The sender in the [Input data] is not specified. Please confirm whether the sender in the [Input data] is specified.
InvalidMailAddressException
<sender> has invalid email format.
Sender address specified in the [Input data] has invalid email format. Please check the sender in the [Input data].
java.io.UnsupportedEncodingException Encoding set to [Encoding] is not supported. Please check the specified encoding in [Encoding].
javax.mail.AuthenticationFailedException: Either [User name] or [Password] is invalid. Check [User name] and [Password].
javax.mail.MessagingException:
ConnectionException
Failed to establish connection to Gmail SMTP server. Check the network reach ability.
javax.mail.SendFailedException
Failed to send message. Ensure that recipient, CC, and BCC for the [Input data] are correct.

Notes