Send One E-mail

Operation Name

Send One E-mail

Function overview

Send a mail to Gmail SMTP server.

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.  
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".
 
From Required Available Enter the email address of the sender.
  • Email addresses registered to the "Send mail as" in the settings for the user on Gmail can be used.
    If the specified email address is not registered to the "Send mail as", the default email address on Gmail is used.
To/Cc/Bcc Required - Enter the email address of the destination.

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the order of the selected column upwards by one.
  • [Down]:
    Move the order of the selected column downwards by one.
  • [Delete]:
    Delete the column.
 
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
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.
Message
Item name Required/Optional Use of Variables Description Remarks
Subject Optional Available Enter Subject.  
Message Optional Available Enter Message.  
Content-Type Optional Available Select a Content-Type or specify a canonical name that represents a content-type.
  • [text/plain]: (default)
  • [text/html]:
  • If omitted, set "text/plain".charset parameter [Encoding] set value.
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".
Attachments
Item name Required/Optional Use of Variables Description Remarks
Attachments Optional - Specify the path of the attachment file.

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

Each column can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the order of the selected column upwards by one.
  • [Down]:
    Move the order of the selected column downwards by one.
  • [Delete]:
    Delete the column.
 
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 of header to give when sending mail.
  • Double-byte key value is not supported.
Header list / Value Required Available Enter the key of 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 reflected in 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 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>].
RecipientsNotFoundException [TO/CC/BCC] is invalid. Check the following.
  • You need to have at least 1 sender address specified in the [TO/CC/BCC].
  • The value specified in the [TO/CC/BCC / Category] is correct.
  • [TO/CC/BCC / Mail Address] is specified.
  • The sender address specified in the [TO/CC/BCC / Mail Address] does not contain multi-byte characters.
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. Make sure [TO/CC/BCC / Mail Address] has a valid recipient address.

Notes