You must define the domain name or IP address of the MAIL and NEWS servers (and their alternative servers) before using EMAIL. It is recommended that you define these servers in the *INSTALLATION/OPTIONS file. Alternatively, you can use a WFL MODIFY of the EMAIL utility; however, you must do so each time you update the EMAIL utility (for example, if you install an Interim Correction (IC) or a new release). If an *INSTALLATION/OPTIONS file does not already exist, you can use CANDE create it. Set the security of the file to PUBLIC IN. For more information about the *INSTALLATION/OPTIONS file, refer to MYOPTIONSUPPORT.
Note: | A user without read access to *INSTALLATION/OPTIONS cannot use EMAIL. |
Syntax
<server>
┌◄───────────────────── , ────────────────────┐ ──┴─┬─<addr>──────────────────────────────────┬─┴──────────────────────┤ └─ ( ──<addr>─┬─────────────────────┬─ ) ─┘ │ ┌◄───── , ────┐ │ └─ , ─┴─<attribute>─┴─┘
<addr>
──┬─<domain name>─┬─┬───────────────────┬──────────────────────────────┤ ├─<ipv4 addr>───┘ └─ : ──<port>───────┤ ├─<ipv6 addr>─────────────────────────┤ └─ [ ──<ipv6 addr>── ] ─┬─────────────┤ └─ : ──<port>─┘
<attribute>
──┬─ MYIPADDRESS ── = ───<ip addr>────────────┬───────────────────────┤ ├─ SSLTYPE ──── = ──┬─ IMPLICIT ──┬─────────┤ │ └─ OFF ───────┘ │ └─ SECALLOWSELFSIGNED ─── = ─┬─ TRUE ──┬───┘ └─ FALSE ─┘
Examples
To define the MAIL and NEWS servers and their alternatives in the *INSTALLATION/OPTIONS file, add records similar to the following if they are not already in the file:
EMAIL MAILSERVER=server1.mycompany.com EMAIL ALTMAILSERVER=server2.mycompany.com,server3.mycompany.com EMAIL MAILSERVER2=(server2.mycompany.com:125, % MYIPADDRESS=255.182.1.2), % (server3.mycompany.com) EMAIL NEWSSERVER=123.45.678.9 EMAIL ALTNEWSSERVER=123.45.678.90 EMAIL ALTNEWSSERVER2=::FFFF:192.111.17.57 EMAIL MAILSERVER =(server3.mycompany.com:465, SSLTYPE=IMPLICIT) EMAIL MAILSERVER =(server3.mycompany.com:465, SSLTYPE=IMPLICIT % , SECALLOWSELFSIGNED=TRUE)
Explanation
Define the servers in the *INSTALLATION/OPTIONS file on the same pack as EMAIL or perform a WFL MODIFY operation on the utility.
The EMAIL utility can use a secure connection (TLS) to the mail server. To enable a secure connection, add an SSLTYPE attribute to the MAILSERVER definition in the *INSTALLATION/OPTIONS file. You can set the <attribute> SSLTYPE to IMPLICIT or OFF. The default value of SSLTYPE is OFF. If the server requires client certificates, you can specify the certificate to be used using the command line or in the CANDE/MYOPTIONS file. To specify the certificate, use the CLIENTCERTIFICATE option.
The client certificate is created using Security Center and the usercode for the certificate must be the usercode specified for the EMAIL utility. For example, to use implicit TLS, add the following to the *INSTALLATION/OPTIONS file:
EMAIL MAILSERVER =(<server>:<port>, SSLTYPE = IMPLICIT)
Then, use the following command:
U EMAIL SEND : CLIENTCERTIFICATE = <certificate><email address>//
By default, EMAIL translates characters sent to or received from the SMTP and NNTP servers using the system-defined HostCCS as the internal coded character set and the next sequential coded character set as the external, or server, coded character set. For example, ASERIESEBCDIC (4) to/from ASCII (5) or Latin1EBCDIC (12) to/from Latin1ISO (13). Records in the *INSTALLATION/OPTIONS file or your CANDE/MYOPTIONS file can override the default coded character sets.
To override the internal coded character set, include an EMAIL HOSTCCS = <coded character set> record, for example:
EMAIL HOSTCCS = JAPANEBCDICJBIS8
To override the external coded character set, include an EMAIL SERVERCCS = <coded character set> record, for example:
EMAIL SERVERCCS = CODEPAGE932
When the default external coded character set is overridden by a record in the *INSTALLATION/OPTIONS file or your CANDE/MYOPTIONS file, EMAIL expects all responses received from the SMTP or NNTP server to be in the specified coded character set. An ERR_TIMEOUT error might occur if the SMTP or NNTP server is not responding in the expected coded character set.
An ERR_CCSCONFLICT error occurs if the internal coded character set is incompatible with the external coded character set. Refer to the coded character set mapping tables in the MultiLingual System Administration, Operations, and Programming Guide for coded character set compatibility.
A record in the *INSTALLATION/OPTIONS file or the CANDE/MYOPTIONS file can define a default domain name. For example,
EMAIL DOMAINNAME = "university.edu"
Defining a default domain name allows for the use of partial email addresses in an EMAIL request. A partial email address contains only the first node of the domain name. For example,
student@compisci
When a default domain name is defined, it is appended to any partial email address. Using the DOMAINNAME and a partial email address, as show in the above examples, results in an email address, as follows:
student@compsci.university.edu
Note that when a partial email address is used without a DOMAINNAME record in either the *INSTALLATION/OPTIONS file or the CANDE/MYOPTIONS file, EMAIL appends the MCP’s fully-qualified domain name to the partial email address.
EMAIL resends messages to recipients that are rejected because of a transient error. By default, five retries are attempted at intervals of 23 hours and 50 minutes. If EMAIL is unable to send the message after the specified number of retries, the sender is sent a failure notification. A record in the *INSTALLATION/OPTIONS file or your CANDE/MYOPTIONS file can override the retry default. For example, the following command limits the number of retries to three at intervals of 1440 minutes (every 24 hours):
EMAIL RETRY=3 x 1440
A record in the *INSTALLATION/OPTIONS file can define the default LOGIN authentication that is used by users who do not define one in their CANDE/MYOPTIONS file:
EMAIL: LOGIN=myusercode/mypassword
Note: | The login credentials must be specified using the LOGIN option when OBJECT/EMAIL is run from a WFL. |
You can also define the components and organization of news articles in the *INSTALLATION/OPTIONS file:
*COMPANY=Our company *DEPARTMENT=Our department *BUILDING=Our building
Alternatively, by performing a WFL MODIFY, you can set up the default MAIL and NEWS servers using either YOURDOMAINNAME or YOURIPADDRESS, the alternative servers using NOTE, and the default organization of news articles using ORGANIZATION.NOTE. The following is an example of the MODIFY statement:
WFL MODIFY *OBJECT/EMAIL; % FILE SMTP(YOURDOMAINNAME="server1.mycompany.com", % NOTE="server2.mycompany.com,server3.mycompany.com"); % FILE NNTP(YOURIPADDRESS="123.45.678.9", % NOTE="123.45.678.90"); % FILE ORGANIZATION(NOTE="Our company, department - building")
The SL (Support Library) command must be performed for EMAILSUPPORT in order to use the OBJECT/EMAIL library entry points. The following is an example:
SL EMAILSUPPORT = *OBJECT/EMAIL ON DISK