Posted: Tue May 16, 2006 3:50 am Post subject: Subject not displayed in the mail sent via SMTP
Hi,
I am using the following JCL for sending mail via SMTP. I am getting the mails, but the Subject line is not getting resolved and is displayed as blank.
Code:
//MAIL001 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSOUT DD SYSOUT=*
//SYSUT1 DD *
HELO MVSB.xyz.COM
MAIL FROM:<abc>
RCPT TO:<def>
DATA
TO:<def>
SUBJECT:List of new customers.
This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.
/*
//*
The mail is sent but the Subject is not getting resolved.
I checked out in the Options tab of the mail that I got, and in the Internet Header area, I found the following message -
Code:
Received: from KFNASMTP01.xyz.com (kfexchsmtp.xyz.com [151.237.30.45]) by usknausglvimc01.us.pm.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2687.74)
id FSRG1RVY; Tue, 16 May 2006 03:14:54 -0500
Received: from MVSB.xyz.COM ([152.157.280.9]) by KFNASMTP01.xyz.com with InterScan Messaging Security Suite; Tue, 16 May 2006 03:14:53 -0500
Received: from MVSB.xyz.COM by MVSB.xyz.COM (IBM MVS SMTP CS V1R4) with BSMTP id JOB25729; Tue, 16 May 06 03:14:51 CST
TO:<def>
SUBJECT:List of new customers.
Date: Tue, 16 May 06 03:14:51 CST
From: <abc>
I also checked the logfile for the smtp job that runs and it shows the following message -
Code:
EZA5460I 05/16/06 03:02:43 BSMTP Helo Domain: MVSB.xyz.COM Yours too, I see!
EZA5474I 05/16/06 03:02:43 Received Note 00000390 via BSMTP From <abc>
EZA5476I 05/16/06 03:02:45 Delivered Note 00000390 to <def>
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue May 16, 2006 7:34 am Post subject:
mf_learner,
Run this step as is just by changing the following
Code:
RCPT TO: <mf_learner>
TO: <mf_learner>
Just put your real email address in there and make sure to enclose your email adress within <>
Code:
//STEP0100 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *
This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.
It worked with a little change, Kolusu. But, there is a problem that still persists.
I had to do a little bit of modification, because with the second instream data, the body of the mail was coming as the subject.
So, I did it like this -
//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *
//*
I got the mail with the Subject as desired. But, at the cost of the mail body.
So, I went ahead and added the body as another instream data -
//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *
// DD *
This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.
Now, I am getting the mail body at the cost of the Subject.
I.e, either of them are coming. Not both at the same time.
Down the line, I need to concat two files along with these. But, unless this gets resolved, I cannot do that.
I had to add a blank line before the mail body and after the second DD * statement.
I am now getting the Subject as well as the body.
//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *
This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.
Thanks a lot for your help, Kolusu. _________________ Thanks
Opening this thread once again because I am getting the same problem of not getting the Subject line displayed when I am using the data through card instead of passing instream(which had worked). The cards are 80 bytes in length.
I used two cards to have the DATA section separetely, but it is still not resolving.
The subject line is just coming as blanks.
For the code, refer to the same code as I have posted top, just replace the instream data passed from SYSUT1 DD * by SYSUT1 DD DSN=aa.bb.cc,disp=shr
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum