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