6.13.3 Mail adapter runtime environment property file
- Organization of this subsection
(1) Format
mailadp.smtp.host.name=IP-address-or-host-name-of-mail-server-to-be-connected-to
[mailadp.smtp.port=port-number-of-mail-server-to-be-connected-to]
[mailadp.user=login-user-name-of-mail-server-to-be-connected-to]
mailadp.addr.from=address-set-in-FROM-field-of-mail
[mailadp.addr.to=address-set-in-TO-field-of-mail]
[mailadp.addr.cc=address-set-in-CC-field-of-mail]
[mailadp.addr.bcc=address-set-in-BCC-field-of-mail]
[mailadp.addr.count.max=maximum-number-of-addresses-that-can-be-set-up]
[mailadp.mail.body.size=mail-body-size]
[mailadp.attach.path.n=absolute-path-of-attachment]
[mailadp.attach.file.size=maximum-size-of-mail-attachment]
[mailadp.max.attach.count.per.mail=maximum-number-of-attachments]
[mailadp.mail.format={text/plain|text/html|text/xml}]
[mailadp.mail.body-text=text-inserted-in-mail-body]
[mailadp.mail.body-filepath=file-path-of-text-inserted-in-mail-body]
[mailadp.mail.body-filecharset={UTF-8|MS932}]
[mailadp.subject.size=mail-subject-size]
[mailadp.subject.text=text-inserted-in-mail-subject]
[mailadp.smtp.encoding=mail-encoding]
[mailadp.smtp.auth={LOGIN|PLAIN}]
[mailadp.user.header.path=absolute-path-of-mail-header-definition-file]
[mailadp.account.file.path=absolute-path-of-mail-adapter-account-definition-file]
[mailadp.methodtrace.level={1|2|3|4|5}]
[mailadp.methodtrace.filepath=directory-to-output-maintenance-log]
[mailadp.methodtrace.filenum=number-of-maintenance-log-files]
[mailadp.methodtrace.filesize=maximum-size-of-one-maintenance-log-file]
[mailadp.messagelog.level={0|10|20}]
[mailadp.smtp.timeout=timeout-value-for-sending-mail]
[mailadp.smtp.connectiontimeout=timeout-value-for-connecting-to-mail-server]
[mailadp.read-lock.retry.count=retry-count-when-shared-lock-of-common-folder-files-fails]
[mailadp.read-lock.retry.interval=retry-interval-when-shared-lock-of-common-folder-files-fails]
[mailadp.exptrace.filenum=maximum-number-of-exception-log-files-output]
[mailadp.exptrace.filesize=maximum-size-of-exception-log-files-output]
[mailadp.smtps.enable={TRUE|FALSE}]
[mailadp.smtps.starttls.enable={TRUE|FALSE}]
[mailadp.smtps.starttls.required={TRUE|FALSE}]
(2) Function
Specifies the configuration information of the mail adapter.
Create the mail adapter runtime environment property file with the name service-ID.properties.
(3) File storage location
- The template file is stored at the following location:
Service-platform-installation-directory\CSC\config\mail\templates\adpmail.properties
- The file service-ID.properties is stored at the following location:
Service-platform-installation-directory\CSC\config\mail
(4) Specifiable properties
(a) Associated with server information
mailadp.smtp.host.name=IP-address-or-host-name-of-mail-server-to-be-connected-to
Specifies the IP address or the host name of the mail server to be connected to. You cannot omit this property.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.smtp.port=port-number-of-mail-server-to-be-connected-to~ <Numeric character> ((1 to 65535)) <<25>>
Specifies the port number of the mail server to be connected to.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
(b) Associated with mail settings
mailadp.user=login-user-name-of-mail-server-to-be-connected-to
Specifies the login user name of the mail server to be connected to. You can specify one-byte alphanumeric characters, one-byte symbols (0x21 to 0x7E in ASCII encoding), and one-byte spaces (0x20 in ASCII encoding). The characters are case sensitive.
The available one-byte symbols are as follows:
-
Exclamation mark (!)
-
Double quotation mark (")
-
Hash mark (#)
-
Dollar sign ($)
-
Percent sign (%)
-
Ampersand (&)
-
Apostrophe mark (')
-
Left parenthesis (()
-
Right parenthesis ())
-
Asterisk (*)
-
Plus sign (+)
-
Comma (,)
-
Hyphen (-)
-
Period (.)
-
Forward slash (/)
-
Colon (:)
-
Semicolon (;)
-
Left angle bracket (<)
-
Right angle bracket (>)
-
Equal sign (=)
-
Question mark (?)
-
At mark (@)
-
Left square bracket ([)
-
Right square bracket (])
-
Yen sign (\)
-
Caret (^)
-
Underscore (_)
-
Grave accent mark (`)
-
Left curly bracket ({)
-
Right curly bracket (})
-
Vertical bar (|)
-
Swung dash (~)
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
Make sure that you specify this property when the SMTP authentication type is LOGIN. You need not specify this property, if the SMTP authentication type is PLAIN.
mailadp.addr.from=address-set-in-FROM-field-of-mail
Specifies a valid address that will be set in the FROM field of the mail to be sent. You cannot omit this property.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.addr.to=address-set-in-TO-field-of-mail
Specifies a valid address that will be set in the TO field of the mail to be sent. To specify multiple addresses, insert commas (,) as delimiters.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.addr.cc=address-set-in-CC-field-of-mail
Specifies a valid address that will be set in the CC field of the mail to be sent. To specify multiple addresses, insert commas (,) as delimiters.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.addr.bcc=address-set-in-BCC-field-of-mail
Specifies a valid address that will be set in the BCC field of the mail to be sent. To specify multiple addresses, insert commas (,) as delimiters.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format is becomes valid.
mailadp.addr.count.max=maximum-number-of-addresses-that-can-be-set-up ~ <Numeric character> ((1 to 768)) <<768>>
Specifies the maximum number of addresses that can be set up in the address field.
The maximum number of addresses includes the total number of addresses set in TO, CC, and BCC fields. If a same address is set multiple times, each address is counted as one.
mailadp.mail.body.size=mail-body-size ~ <Numeric character> ((1 to 2048000)) <<1024000>>
Specifies the size of the mail body in bytes.
mailadp.attach.path.n=absolute-path-of-attachment
Specifies an absolute path for the attachment. In n, specify a natural number from 1 to 100 depending on the number of attachments. An example of specification is as follows:
-
For one attachment
mailadp.attach.path.1=C:\\temp\\attach1.txt
-
For multiple attachments
mailadp.attach.path.1= C:\\temp\\attach1.txt mailadp.attach.path.2= C:\\temp\\attach2.txt ...
Use the characters / or \\ as directory delimiters. When you specify multiple attachments, if you specify the same file twice, the same file is attached twice.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.attach.file.size=maximum-size-of-mail-attachment ~ <Numeric character> ((0 to 5242880)) <<5242880>>
Specifies the maximum size of one mail attachment in bytes.
mailadp.max.attach.count.per.mail=maximum-number-of-attachments ~ <Numeric character> ((0 to 100)) <<10>>
Specifies the maximum number of files that can be attached to one email.
mailadp.mail.format={text/plain|text/html|text/xml} ~ <<text/plain>>
Specifies text/plain, text/html, or text/xml# as the mail formats.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
- #
-
-
If text/xml is specified, the mail adapter displays the data in the plain text format.
-
mailadp.mail.body-text=text-inserted-in-mail-body
Specifies the text to be inserted in the mail body.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.mail.body-filepath=file-path-of-text-inserted-in-mail-body
Specifies any file path. The text of the file specified here is read in the mail body. Use the characters / or \\ as directory delimiters.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.mail.body-filecharset={UTF-8|MS932} ~ <<UTF-8>>
Specifies the character set of the file specified with the mailadp.mail.body-filepath key. The characters are not case sensitive.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.subject.size=mail-subject-size ~ <Numeric character> ((0 to 80)) <<80>>
Specifies the size of the mail subject. If the number of characters in the subject exceeds the specified size, the exceeded characters are trimmed.
mailadp.subject.text=text-inserted-in-mail-subject
Specifies the text to be inserted in the mail subject. If no value is specified, the mail is sent without a subject.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.smtp.encoding=mail-encoding ~ <<ISO-2022-JP>>
Specifies the mail encoding. The specified encoding is used while the mail is being sent.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.smtp.auth={LOGIN|PLAIN} ~ <<PLAIN>>
Specifies the authentication type for the mail server. The characters are not case sensitive.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.user.header.path=absolute-path-of-mail-header-definition-file
Specifies an absolute path for the mail header definition file. Use the characters / or \\ as directory delimiters.
You can also specify the information in the request message format of the mail adapter. If the information is duplicated, the value in the request message format becomes valid.
mailadp.account.file.path=absolute-path-of-mail-adapter-account-definition-file
Specifies an absolute path for the mail adapter account definition file. Use the characters / or \\ as directory delimiters.
(c) Associated with maintenance log
mailadp.methodtrace.level={1|2|3|4|5} ~ <<3>>
Specifies the output levels for the maintenance log. The following table lists the output information and the output levels:
|
Output information |
Output level# |
||||
|---|---|---|---|---|---|
|
1 |
2 |
3 |
4 |
5 |
|
|
Error information (cause of exception) |
Y |
Y |
Y |
Y |
Y |
|
Entrance and exit information for the requester service method (class name, method name, argument, return value) |
N |
Y |
Y |
Y |
Y |
|
Entrance and exit information for the external (such as BP) interfaces (class name, method name, argument, return value) |
N |
N |
Y |
Y |
Y |
|
Entrance and exit information for the interfaces within the components (class name, method name, argument, return value) |
N |
N |
N |
Y |
Y |
|
Mail sending information (mail server connection, mail details, message trace) |
N |
N |
N |
Y |
Y |
|
Debug information (information such as the branching of processing) |
N |
N |
N |
N |
Y |
- Legend:
-
Y: Information is output.
N: Information is not output.
- #
-
If you specify 4 or 5 as the maintenance log output level, the mail address used for sending the mail is output.
mailadp.methodtrace.filepath=directory-to-output-maintenance-log
Specifies an absolute path for the directory to output the maintenance log. Use the characters / or \\ as directory delimiters.
If the specified folder does not exist, the log is output to work-directory-of-J2EE-server\ejb\J2EE-server-name\logs\CSCADP\MAILADP\maintenance\service-ID.
You can change work-directory-of-J2EE-server\ejb\J2EE-server-name\logs with the ejb.server.log.directory in the usrconf.cfg key (option definition file for J2EE servers). For details on usrconf.cfg, see 2.2.2 usrconf.cfg (Option definition file for J2EE servers) in the uCosminexus Application Server Definition Reference Guide.
mailadp.methodtrace.filenum=number-of-maintenance-log-files ~ <Numeric character> ((1 to 16)) <<8>>
Specifies the number of maintenance log files.
mailadp.methodtrace.filesize=maximum-size-of-one-maintenance-log-file ~ <Numeric character> ((4096 to 147483647)) <<2097152>>
Specifies the maximum size of one maintenance log file in bytes.
(d) Associated with message log
mailadp.messagelog.level={0|10|20} ~ <<10>>
Specifies the output levels for the message log. The following table lists the output information and the output levels:
|
Output information |
Description |
Output level |
||
|---|---|---|---|---|
|
0 |
10 |
20 |
||
|
Error information |
Cause of an exception or an error |
Y |
Y |
Y |
|
Warning information |
Information such as the problem that occurred |
N |
Y |
Y |
|
Information |
Content of the messages and arguments Change in the HCSC-Messaging status (when starting or stopping) During command reception and completion of execution Event notification |
N |
N |
Y |
- Legend:
-
Y: Information is output.
N: Information is not output.
(e) Associated with re-connection
mailadp.smtp.timeout=timeout-value-for-sending-mail ~ <Numeric character> ((0 to 3600)) <<180>>
Specifies the timeout value for sending a mail, in seconds. A timeout does not occur if you specify 0.
The value of this property will be set for the mail.smtp.timeout property, which is a JavaMail session property used for sending emails to the SMTP server.
mailadp.smtp.connectiontimeout=timeout-value-for-connecting-to-mail-server ~ <Numeric character> ((0 to 86400)) <<180>>
Specifies the timeout value for connecting to a mail server, in seconds. A timeout does not occur if you specify 0.
The value of this property will be set for the mail.smtp.connectiontimeout property, which is a JavaMail session property used for sending emails to the SMTP server.
(f) Associated with lock acquisition timeout
mailadp.read-lock.retry.count=retry-count-when-shared-lock-of-common-folder-files-fails ~ <Numeric character> ((0 to 1024)) <<0>>
Specifies the retry count when a shared lock of the files in the common folder fails.
mailadp.read-lock.retry.interval=retry-interval-when-shared-lock-of-common-folder-files-fails ~ <Numeric character> ((1 to 1024)) <<1>>
Specifies the retry interval when a shared lock of the files in the common folder fails, in seconds.
(g) Associated with exception log
mailadp.exptrace.filenum=maximum-number-of-exception-log-files-output ~ <Numeric character> ((1 to 16)) <<8>>
Specifies the maximum number of exception log files that will be output.
mailadp.exptrace.filesize=maximum-size-of-exception-log-files-output ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>
Specifies the maximum size (in bytes) of exception log files that will be output.
(h) Associated with TLS
mailadp.smtps.enable={TRUE|FALSE} ~ <<FALSE>>
Specifies whether to use TLS to connect to the SMTP server. The characters are not case sensitive.
-
TRUE
TLS is used to connect to the SMTP server.
-
FALSE
TLS is not used. SMTP is used to connect to the SMTP server.
mailadp.smtps.starttls.enable={TRUE|FALSE} ~ <<TRUE>>
Specifies whether to use STARTTLS when TLS is used for connection with the SMTP server. This property is valid only when you specify TRUE for the mailadp.smtps.enable property. The characters are not case sensitive.
-
TRUE
STARTTLS is used. Communication starts with normal SMTP. Then, when it is confirmed that both parties support TLS by using STARTTLS, the connection is re-established via TLS.
-
FALSE
STARTTLS is not used. All SMTP communications are encrypted by TLS.
mailadp.smtps.starttls.required={TRUE|FALSE} ~ <<FALSE>>
When the mail adapter uses STARTTLS, this property specifies whether the mail adapter will generate an error when one of the following conditions is met on the SMTP server to connect to.
-
The SMTP server to connect to does not support STARTTLS.
-
An error occurs during processing of STARTTLS on the SMTP server to connect to.
This property is valid only when you specify TRUE for both the mailadp.smtps.enable and mailadp.smtps.starttls.enable properties. The characters are not case sensitive.
-
TRUE
The mail adapter will generate an error.
-
FALSE
SMTP is used to connect to the SMTP server.
(5) Example of coding
An example of coding of the mail adapter runtime environment property file is as follows:
mailadp.smtp.host.name=domainName.com mailadp.smtp.port=25 mailadp.user=john mailadp.addr.from=sampleuser@XXXXXX.com
(6) Notes
-
An error occurs if any one of the following properties is not specified:
-
mailadp.addr.to
-
mailadp.addr.cc
-
mailadp.addr.bcc
-
-
Two-byte characters are interpreted as invalid strings. Therefore, you must convert such characters by using the following hjdk.native2ascii.jar tool.
service-platform-installation-directory\jdk\bin\java -jar service-platform-installation-directory\jdk\lib\hcompatlib\hjdk.native2ascii.jar input-file-path output-file-path
For details about the hjdk.native2ascii.jar tool, see the JDK documentation.
-
Note the following when you specify the path:
-
Do not specify a path that contains characters expressing a relative path or a parent directory (..\ or ../) or characters expressing a current directory (.\ or ./).
-
Do not specify a path containing a symbolic link.
-
In Windows, do not specify a path containing a UNC format, an NTFS stream name, or a reserved device name. The path characters are not case sensitive.
-