Hi,
I am trying to trigger an email from mainframe which contains data in tabular form using BATCHTMP.
//IVP0 EXEC BATCHTMP
//INDD DD DISP=SHR,DSN=TEST.OUT
//SYSIN DD *
%XMITIP (ABC.COM) -
SUBJECT 'TEST LE' -
FROM XYZ.COM -
MSGDD INDD
/*
But I am not getting the format in COURIER NEW style due to which the content is not alligned. please my output below.
Select Courier New font "in the outlook" by which I think you mean "in Outlook". Tme mainframe basically uses a fixed pitch font and does not know about these fancy fonts on the PC. These are set on the PC in whichever application you want that font.
BTW, the fact that the mainframe uses a fixed font is why you should always use the code tags when showing mainframe stuff in the forum because the forum uses a variable pitched font and HTML also removes extra spaces.
You could format your PS file as a HTML document and make outlook format it with monospace format. It is not technically XMITIP solution. It uses SMTP.
The following assumption is made: Your SMTP SYSOUT is (B,SMTP)
Input PS file:
Code:
Command ===>
****** ***************************** Top of Data **
000001 HELLO THIS IS SPARTAA
000002 ALL YOUR BAZEZ BELONG TO UZ
****** **************************** Bottom of Data
Output outlook email:
Code:
HELLO THIS IS SPARTAA
ALL YOUR BAZEZ BELONG TO UZ
The code:
Code:
//EMAIL EXEC PGM=IEBGENER
//SYSUT1 DD *
HELO LPAR
MAIL FROM:<VASANTHZ@TROLLLAND.COM> <- From email address
RCPT TO:<VASANTHZ@SOMEEMAIL.COM> <- To email address
DATA
FROM: VASANTHZ@TROLLLAND.COM <- From email
TO: VASANTHZ@TROLLLAND.COM <- To email
SUBJECT: THIS IS A TEST EMAIL
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/HTML
<html>
<body>
<pre style="font: monospace">
/*
// DD DSN=YOUR.PS.REPORT.FILE,DISP=SHR <- The PS file you are sending as email
// DD *
</pre>
</body>
</html>
/*
//SYSUT2 DD SYSOUT=(B,SMTP) <- Your SMTP output SYSOUT
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*