But following is the example that sends mail without attachmnet and it works.
/* REXX - 08/10/09 */
PARSE ARG RECPT MSG
SMTP.1 = 'HELO' MVSVAR('SYSNAME')
SMTP.2 = 'MAIL FROM:<MYNAME@MYORG.COM>'
SMTP.3 = 'RCPT TO:<'RECPT'>'BNAME")) OLD REUSE"
SMTP.4 = 'DATA'
SMTP.5 = 'FROM MAIN FRAME RACF ID ' MVSVAR('SYSSECLAB')
SMTP.6 = 'TO:' RECPT
SMTP.7 = 'SUBJECT: JES2LOG FOR JOB ' JOBNAME
SMTP.8 = MSG
"ALLOC F(SMTPOUT) SYSOUT(A) WRITER(SMTP)"
IF RC <> 0 THEN DO
SAY 'ERROR ALLOCATING SYSOUT FOR SMTP WRITER'
EXIT 12
END
SAY 'ALLOCATED ' SMTPOUT
"EXECIO * DISKW SMTPOUT (STEM SMTP. FINIS"
"FREE F(SMTPOUT)"
PARSE ARG RECPT MSG
SMTP.1 = 'HELO' MVSVAR('SYSNAME')
SMTP.2 = 'MAIL FROM:<MYNAME@MYORG.COM>'
SMTP.3 = 'RCPT TO:<'RECPT'>'BNAME")) OLD REUSE"
SMTP.4 = 'DATA'
SMTP.5 = 'FROM MAIN FRAME RACF ID ' MVSVAR('SYSSECLAB')
SMTP.6 = 'TO:' RECPT
SMTP.7 = 'SUBJECT: JES2LOG FOR JOB ' JOBNAME
SMTP.8 = MSG
"ALLOC F(SMTPOUT) SYSOUT(A) WRITER(SMTP)"
IF RC <> 0 THEN DO
SAY 'ERROR ALLOCATING SYSOUT FOR SMTP WRITER'
EXIT 12
END
SAY 'ALLOCATED ' SMTPOUT
"EXECIO * DISKW SMTPOUT (STEM SMTP. FINIS"
"FREE F(SMTPOUT)"