When you send an email with ESEND, information is entered into the From address field based on data areas, user profile entries, or SMTP entries. ESEND determines the information to use in the e-mail’s From address based on the following hierarchy:
You can control the information used in the From address of an e-mail by changing the data in any of these entries, as described below.
Choose one of the following options to control the From address(es) for different jobs. These options correspond to the hierarchy listed above.
Create a data area called ESNDADTA in the QTEMP library with the following atrributes:
Note: You can change the data area dynamically with a script or user program.
Using ESEND From Address
ESEND From addresses are stored in the ESNDADRP file. Using the ESNDADR command, you can create or edit the ESNDADRP address book file for your own user profile or any profile you have *CHANGE authority to. You can enter a name and e-mail address for each user profile.
Note: Use this option if you do not want to use the WRKDIRE entry SMTP function, or if you want to override its value.
Edit a user profile to associate it with an SMTP name in the IBM directory list. Select option 2 from the WRKDIRE edit screen to edit a user profile, and then press function key 19 to add or modify an e-mail address.
Note: There are two different formats for entering SMTP information for a user, depending on whether the CVTNAMSMTP command has been run. This command changes the structure of e-mail (SMTP) addresses associated with a WRKDIRE user entry, due to size limitations in the name.
where user_ID can be a maximum of 24 characters.
The SMTP name used for the address is [email protected]_name
The SMTP name used for the address is [email protected]_SMTP
If No Data Exists
If there is no ESNDADTA data area, no address book entry, and no WRKDIRE, ESEND attempts to build an SMTP name from the user profile, the local host name from option 12 of the CFGTCP menu, and the local domain name from option 12 of the CFGTCP menu.
The SMTP name used for the address is [email protected]_name.domain_name
You have a job that retrieves information and sends it via e-mail to customers and vendors. In the cus- tomer e-mails, the From address is to be [email protected] In the vendor e-mails, the From address is to be [email protected] To fill in the appropriate From address, your job creates the data area ESNDADTA in the QTEMP library, and then changes the data area for each e-mail depending on the recipient type—customer or vendor.
Note: For this type of scenario, the data area creation and address change should take place as the job runs, and not before the job is submitted.
Still have questions? We can help. Submit a case to Technical Support.