I tried the following program which was given by another member in this forum. I do get the mail in my mail box, but i get some errors. Can anyone let me know the correct syntax? (Iam giving below the mail program as well the output received in the mail box).
The Prgm
//MMAIL JOB (PS),'PS-MAIL',CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//S1 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
HELO ABC
MAIL FROM: <alex@gmail.com>
RCPT TO: <alex@gmail.com>
DATA
TO: <alex@gmail.com>
FROM: "Alex"<alex@gmail.com>
SUBJECT: HELLO
THIS IS A TEST MAIL.
//*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//*
//S1 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
HELO ABC
MAIL FROM: <alex@gmail.com>
RCPT TO: <alex@gmail.com>
DATA
TO: <alex@gmail.com>
FROM: "Alex"<alex@gmail.com>
SUBJECT: HELLO
THIS IS A TEST MAIL.
//*
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//*
The Output (In my mail box)
Unable to deliver mail to some/all recipients.
050 DATA 00080003
501 Syntax Error. No Args after 'DATA' command
050 TO: <alex@gmail.com> 00090003
500 Unknown command, 'TO'
050 FROM: "Alex"<alex@gmail.com> 00100003
500 Unknown command, 'FROM'
050 SUBJECT: HELLO 00110003
500 Unknown command, 'SUBJECT'
050 THIS IS A TEST MAIL. 00120003
500 Unknown command, 'THIS'
** Text of Mail follows **
HELO ABC 00050003
MAIL FROM: <alex@gmail.com> 00060005
RCPT TO: <alex@gmail.com> 00070005
DATA 00080005
TO: <alex@gmail.com> 00090005
FROM: "Alex"<alex@gmail.com> 00100005
SUBJECT: HELLO 00110003
THIS IS A TEST MAIL.
050 DATA 00080003
501 Syntax Error. No Args after 'DATA' command
050 TO: <alex@gmail.com> 00090003
500 Unknown command, 'TO'
050 FROM: "Alex"<alex@gmail.com> 00100003
500 Unknown command, 'FROM'
050 SUBJECT: HELLO 00110003
500 Unknown command, 'SUBJECT'
050 THIS IS A TEST MAIL. 00120003
500 Unknown command, 'THIS'
** Text of Mail follows **
HELO ABC 00050003
MAIL FROM: <alex@gmail.com> 00060005
RCPT TO: <alex@gmail.com> 00070005
DATA 00080005
TO: <alex@gmail.com> 00090005
FROM: "Alex"<alex@gmail.com> 00100005
SUBJECT: HELLO 00110003
THIS IS A TEST MAIL.
________
The JCL however completed with RC=0.
thanks