Send Multiple Mails

Operation Name

Send Multiple Mails

Function Overview

This operation is to send multiple emails using the SOAP API sendEmail() call.

With regarding to the API specification utilized by this operation, please refer to the version of the API document, selected for the Global Resource, in the below-mentioned link.

Data Model

The data model of this component is the Table Model type.

Properties

For information about using variables, refer to "variables".
Basic Settings
Item name Required/Optional Use of Variables Description Supplement
Name Required Not Available Enter the name that appears 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 Supplement
Destination Required Not Available Select Global Resources.
  • [Add...]:
    Add new global resource.
  • [Edit...]:
    Global resource settings can be edited by [Edit Resource list].
  • A global resource on API 14.0 or later versions can be specified.
Option Settings
Item name Required/Optional Use of Variables Description Supplement
Column name type Required Not Available Choose the display type of the column name, for displaying the schema in mapping.
  • [Label]:
    The label name (item name) defined in Salesforce is displayed.
  • [API] :(default)
    The API reference name defined in Salesforce is displayed.
 
Batch size Required Available Specify a batch size for sending multiple emails.
  • The default value is "10".
  • A number of 1 or greater, up to 10, can be set. An error occurs if any number outside of this range is set.
  • Depending on the operating environment, increasing the batch size generally helps improve the performance of the write data operation.
  • According to the Salesforce adapter specifications, if you set a batch size to 10 when sending 50 emails, the sending operation is performed in 5 installments.
Specify file path with the OS local file system path Optional Not Available Select whether to specify a file path of attachment file in OS local file system path.
  • [Checked]:
    Specify a path on OS local file system.
    The same behavior as before this item is added will be retained.
  • [Not Checked]:(default)
    Specify a path on DataSpider File System.
  • If an icon has been created before this item is added, the default value is [Checked].
  • If [Not Checked] is selected, please specify an absolute path on DataSpider File System.
  • If [Not Checked] is selected, the prohibited characters on the DataSpider File System except for the path delimiter "/" cannot be used.
  • If [Checked] is selected, please specify an absolute path on the server OS local File System.
Comment
Item name Required/Optional Use of Variables Description Supplement
Comment Optional Not Available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

(Hereafter shown as "Lable/API")

<?xml version="1.0" encoding="UTF-8" ?>
<table>
  <row>
    <column>Sender display name/senderDisplayName</column>
    <column>Reply To/replyTo</column>
    <column>TO address/toAddresses</column>
    <column>CC address/ccAddresses</column>
    <column>BCC address/bccAddresses</column>
    <column>Subject/subject</column>
    <column>Body/body</column>
    <column>File Attachments/fileAttachments</column>
    <column>Document attachment IDs/documentAttachmentIds</column>
    <column>Template ID/templateId</column>
    <column>Target object ID/targetObjectId</column>
    <column>What ID/whatId</column>
    <column>BCC sender/bccSender</column>
    <column>Save as activity/saveAsActivity</column>
    <column>Use signature/useSignature</column>
    <column>Email priority/emailPriority</column>
    <column>Body type/bodyType</column>
    <column>Charset/charset</column>
  </row>
  <row>
    :
  </row>
</table>
Element Name Column Name(Label/API) Required/Optional Allowing Multiple Specifications Data Type Input Example Supplement
row
-
-
-
-
-
  • Repeats as many times as the number of input data.
column Sender display name/senderDisplayName Optional - String Ichiro Yamada
  • Maximum length is 200 characters.
  • If omitted, the Salesforce user name who sent the email is displayed.
Reply TO/replyTo Optional - String replymail@xxx.co.jp
  • When using a Visualforce template in which "replyTo" is specified, do not set a value.
TO address/toAddresses Optional Yes (separated by comma) String[] mail1@xxx.co.jp,mail2@xxx.co.jp,mail3@xxx.co.jp
  • Maximum number of addresses is 100, but could differ by API version.
  • At least one of TO, CC, BCC or Send-To ID must be set.
CC address/ccAddresses Optional Yes (separated by comma) String[] mail1@xxx.co.jp,mail2@xxx.co.jp
  • Maximum number of addresses is 25, but could differ by API version.
  • At least one of TO, CC, BCC or Send-To ID must be set.
BCC address/bccAddresses Optional Yes (separated by comma) String[] mail1@xxx.co.jp,mail2@xxx.co.jp
  • Maximum number of addresses is 25, but could differ by API version.
  • At least one of TO, CC, BCC or Send-To ID must be set.
Subject/subject Optional - String Subject  
Body/body Required - String Body  
File Attachments/fileAttachments Optional Yes (separated by comma) String[] /data/test.txt,/data/test2.csv
  • Please input a file system path specified in [File Path is specified in OS Local File System Path].
  • Up to 10MB of total file size, including the files specified by File Path and specified by Document ID, can be attached.
Document attachment IDs/documentAttachmentIds Optional Yes (separated by comma) id[] 01570000000xxx1,01570000000xxx2
  • Up to 10MB of total file size, including the files specified by File Path and specified by Document ID, can be attached.
Template ID/templateId Optional - id 00X7000000xxxxx
  • If an template ID is set, the subject and body will be accordance with the template. Also, a send-to ID will be required.
Target object ID/targetObjectId Optional - id 0037000000xxxxx
  • Set data ID such as Contact or User, as send-to address.
What ID/whatId Optional - id 0067000000xxxxx
  • Specify data ID that ties to a placeholder of a template.
BCC sender/bccSender Optional - boolean TRUE
  • If BCC addresses are specified, BCC does not include the sender.
  • "FALSE" is set if omitted.
Save as activity/saveAsActivity Optional - boolean FALSE
  • Record activity history in the items specified as Send-To ID or Allocation ID.
  • "TRUE" is set if omitted.
Use signature/useSignature Optional - boolean FALSE
  • "TRUE" is set if omitted.
Email priority/emailPriority Optional - String High
  • Setting values
    1. "Highest"
    2. "High"
    3. "Normal" (default)
    4. "Low"
    5. "Lowest"
  • "Normal" is set if omitted.
Body type/bodyType Required - String HTML Format
  • Setting values
    1. "Text Format", "Text" or "TEXT"
    2. "HTML Format" or "HTML"
Charset/charset Optional - String UTF-8
  • Setting values
    1. "Shift-JIS"
    2. "GB2312"
    3. "UTF-8"
    4. "ks_c_5601-1987"
    5. "EUC-JP"
    6. "JIS"
    7. "Big5"
    8. "ISO-8859-1" or "ISO-LATIN-1"
  • If omitted, the "Email Character Code" in Salesforce is set.

Output Schema

None.

Reading Schema by Mapper

The schema will be read automatically.

Usage on PSP Script

Cannot be used on PSP Script.

Available Component variables

Component Variable Name Description Supplement
read_count The number of input data is stored.
  • The default value is null.
send_count The number of data that was successful in the send email processing is stored.
  • The default value is null.
error_count The number of data that was unsuccessful in the send email processing is stored.
  • The default value is null.
server_url The end point URL after Login is stored.
  • The default value is null.
session_id The session Id is stored.
  • The default value is null.
message_category In the case that an error occurs, the category of the message code corresponding to the error is stored.
  • The default value is null.
message_code In the case that an error occurs, the code of the message code corresponding to the error is stored.
  • The default value is null.
message_level In the case that an error occurs, the importance of the message code corresponding to the error is stored.
  • The default value is null.
operation_api_exception_code The ExceptionCode of the occured error, in a case of API error, is stored.
  • The default value is null.
  • For any error other than an API Error, the value is not stored.
  • The content to be stored may change according to the version of DataSpider Servista.
operation_error_message If an error occurs, the error message of the occured error is stored.
  • The default value is null.
  • The content to be stored may change according to the version of DataSpider Servista.
operation_error_trace When an error occurs, the trace information of the occured error is stored.
  • The default value is null.
  • The content to be stored may change according to the version of DataSpider Servista.

Specification Limits

Main exceptions

Exception Name Reason Resolution
ResourceNotFoundException
Resource Definition is Not Found. Name:[]
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource Definition is Not Found. Name:[<Global Resource Name>]
The resource definition selected in [Destination] cannot be found. Verify the global resource specified in [Destination]
java.net.UnknownHostException This exception occurs when the PROXY server specified in the global resource cannot be found. Verify the condition of the PROXY server. Or verify [Proxy host] of the global resource specified in the [Destination].
  • API 23.0 or earlier
    org.apache.commons.httpclient.HttpConnection$ConnectionTimeoutException
  • API 26.0 or later
    java.net.SocketTimeoutException
    connect timed out
A time-out has occurred while connecting to Salesforce. Verify the network condition and Salesforce server condition. Or check [Connection timeout(sec)] of the global resource specified in the [Destination].
  • API 23.0 or earlier
    org.apache.commons.httpclient.HttpRecoverableException
    java.net.SocketTimeoutException: Read timed out
  • API 26.0 or later
    java.net.SocketTimeoutException
    Read timed out
A time-out has occurred while waiting for a responce from the server after connecting to Salesforce. Verify the network condition and Salesforce server condition. Or check [Timeout(sec)] of the global resource specified in the [Destination].
jp.co.headsol.salesforce.adapter.exception.SalesforceAdapterIllegalArgumentException Invalid value is set for the property of Salesforce adapter. Check the error message, and verify the settings.
com.sforce.soap.partner.fault.LoginFault Login to Salesforce has failed. Check the ExceptionCode or error message, and refer to the information about this type of error in Salesforce-related documents etc.
com.sforce.soap.partner.fault.UnexpectedErrorFault An unexpected error has occured while processing to Salesforce. Check the ExceptionCode or error message, and refer to the information about this type of error in Salesforce-related documents etc.

Notes