Dear friend,

command MMAIL/EMBEDSPLF allows to create a HTML stream file containing
- a message, and
- a spooled file.

You may then use MMAIL command EMLHTML, EMLNOTE or POSTANOTE to send an e-mail message
where this HTML stream file acts as message body.
In this way you may e-mail a spooled file embedding into the message body, instead of attaching it.

In this example
- We used source file MMAIL/TXTSRC, member EMBEDSPLF1 for message text. Use URL
http://www.easy400.net/mmailp/dspsrc1.pgm?xlib=MMAIL&xfile=TXTSRC&xmbr=EMBEDSPLF1
to display it.
- we used command
DSPLIB LIB(QTEMP) OUPUT(*PRINT)
to generate a QPDSPLIB spooled file
- then we used command
MMAIL/EMBEDSPLF TOSTMF('/mmail/html/embedsplf1.html')
SPLF(QPDSPLIB) SPLFONT('monospace' 100 '#000080' 'gold' *YES)
MSGSRCF(MMAIL/TXTSRC) MSGSRCMBR(EMBEDSPLF1) MSGTYPE(*TEXT)
to create the stream file '/mmail/html/embedsplf1.html'
containing a message body in HTML format.
That stream file is the one you are reading now.

That HTML stream file body can then be sent with one of the following commands:
- MMAIL/EMLHTML SUBJECT('Example 1 of an embedded spooled file')
FROMNAME('Johnny, Cash')
FROMADDR('jcash@cashisland.com') TO('jerrylou@yahoo.com'/'Jerry'/*TO)
HTML('/mmail/html/embedsplf1.html')
- MMAIL/EMLNOTE SUBJECT('Example 1 of an embedded spooled file') NOTESRC(*STMF)
NOTESTMF('/mmail/html/embedsplf1.html') NOTETYPE(*HTML) DSTTYPE(*FREELIST)
TO((jerrylou@yahoo.com *TO))
- MMAIL/POSTANOTE SUBJECT('Example 1 of an embedded spooled file') NOTESRC(*STMF)
NOTESTMF('/mmail/html/embedsplf1.html') NOTETYPE(*HTML) DSTTYPE(*FREELIST)
TO((jerrylou@yahoo.com *TO))

Best regards,

Giovanni

 5770SS1 V7R2M0  140418                   Display Library                                        7/20/20  9.37.49        Page    1  
 Library . . . . . . . . . . . . . . . . :   QTEMP                                                                                  
 Type  . . . . . . . . . . . . . . . . . :   TEST                                                                                   
 Number of objects . . . . . . . . . . . :            3                                                                             
 Library ASP number  . . . . . . . . . . :       1                                                                                  
 Library ASP device  . . . . . . . . . . :   *SYSBAS                                                                                
 Library ASP group   . . . . . . . . . . :   *SYSBAS                                                                                
 Create authority  . . . . . . . . . . . :   *SYSVAL                                                                                
 Text description  . . . . . . . . . . . :                                                                                          
   Object      Type      Attribute             Size  Description                                                                    
   BRWSPL      *FILE     PF                 2658304                                                                                 
   IFSOPNCLO   *FILE     PF                   65536  IFS Opens & Close counts                                                       
   XXXBNDR     *DTAARA                         8192  Part boundary used by MMAIL                                                    
                     Total size :           2846720                                                                                 
                   * * * * *   E N D   O F   L I S T I N G   * * * * *