Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Tue Nov 29, 2005 12:38 pm Post subject: How to send email?
Is it possible to Send an E-Mail from Mainframe ???
Yes, It is possible to send a mail from mainframe to outside world. The simplest way is to use IEBGENER - with the help of SMTP. You can also use REXX to do this.
Code:
//STEP1 EXEC PGM=IEBGENER
//*
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT2 DD SYSOUT=(A,SMTP)
//SYSUT1 DD *
HELO SYSA
MAIL FROM:<KOLUSU@HOTMAIL.COM>
RCPT TO:<VIKRAM@HOTMAIL.COM>
DATA
FROM: <KOLUSU@HOTMAIL.COM>
TO: VIKRAM@HOTMAIL.COM
SUBJECT: file
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;
BOUNDARY= "MYDELIM"
THIS MESSAGE IS IN MIME FORMAT
--MYDELIM
Content-Disposition: attachment; filename="YOUR ATTACH FILE.txt"
CONTENT-TYPE: TEXT/HTML
<PRE> <FONT FACE="ARIAL" SIZE=1>
// DD DISP=SHR,DSN=YOUR.PDS(MEMBER)
// DD *
--MYDELIM
.
quit
//*
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