//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(9,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD *
HELO <mainframe name>
MAIL FROM: <xxxxxxxx@xxx.xxx>
RCPT TO: <xxxxxxxx@xxx.xxx>
DATA
FROM: <whoever>
TO: <whoever>
Subject: <subject line>
data lines
.
/*
Comments:
1. The sysout class is specific to site -- we use 9; a lot of sites use B, but only your site support group can tell you for sure.
2. The sysout started task name is specific to site -- we use SMTP but only your site support group can tell you for sure
3. HELO, MAIL FROM, RCPT TO, and DATA lines are required. Multiple recipients require multiple RCPT TO lines, one per recipient
4. Line numbers are not part of SMTP and will cause problems.
5. The data lines must be followed by a single line with a period on it and nothing else. If the period is missing, the email is not valid and will not be sent.
6. This is instream -- the data could come from a file. The record limit is 998 characters (1000 minus the carriage return and line feed added for PC systems)
7. The <> around the MAIL FROM and RCPT TO addresses are not optional -- they are part of the standard