Hi All,

Getting there.... slowly !!! - Thanks for the input so far.

Since the last post i downloaded and installed the latest MMAIL 
release (i was on an early 2004 version!).

That was where the fun started... all my CL programs using EMLxxx 
died because of the different parameter structure... these i've all 
changed and they're fine

HOWEVER....

I have a couple of RPGLE programs which embed a HTML document 
(including an image) and email on to a customer... this used to work 
great... i'm now getting CPF001 error messages calling the below 
program... i think i've got blinkered and would appreciate any 
pointers to the below code.

Many thanks 

Andy


H DFTACTGRP(*NO) ACTGRP('CGI') BNDDIR('QSYS/QC2LE')                  
 /Copy MMAIL/qrpglesrc,hspecs                                        
 /Copy MMAIL/qrpglesrc,hspecsbnd                                     
                                                                     
  // F-Specs Here                                                    
                                                                     
 /Copy MMAIL/qrpglesrc,mailproto                                     
 /Copy MMAIL/qrpglesrc,prototypeb                                    
 /Copy MMAIL/qrpglesrc,variables3                                    
 /Copy MMAIL/qrpglesrc,usec                                          
                                                                     
  //For sending e-mails                                              
D MimeFName       s            512a                                  
D MimeSName       s             50a                                  
D MimeSEmail      s             50a                                  
D  MimeFSubj      s             70a                                  
D  MimeFImpo      s             10i 0                             
D  MimeFPrio      s             10i 0                             
D  MimeFSens      s             10i 0                             
D  FromFName      s            512a                               
D  ContType       s             21a                               
D  BinFlag        s              1a                               
D  ImbAtt         s             10i 0                             
D  ImbAttCid      s             10i 0                             
D  ToName         s             50a   Dim(1000)                   
D  ToAddr         s            256a   Dim(1000)                   
D  ToDist         s             10i 0 Dim(1000)                   
D  FromAddr       s            255a                               
D  CpfID          s              7a                               
C     *ENTRY        PLIST                                         
C                   PARM                    SUBJ             90   
C                   PARM                    SNAME            30   
C                   PARM                    SEMAIL           50
C                   PARM                    TONM             30
C                   PARM                    TOAD             50
C                   PARM                    Fname            27
C                   move      SEMAIL        FRAD             50
        
                                                                      
 
 /Free                                                                
 
    // Create the temporary MIME file to be sent
    MimeFName = '/mmail/mime/x'+%SubST(Fname:13:15);
    MimeCrtF(MimeFName);
 
    // Add the MIME Sender header
    MimeSName  = SNAME;
    MimeSEMail = SEMAIL;
    MimeSender(MimeFName:MimeSName:MimeSEmail);
 
    // Add the MIME To headers
    toName(1) = TONM;
    toAddr(1) = TOAD;
    toDist(1) = 0;
    MimeDistr(MimeFName:ToName:ToAddr:ToDist);
  
    // Add the MIME Subject header
    MimeFSubj = SUBJ;
    MimeSubj(MimeFName:MimeFSubj);
  
    // Add the Importance header
    MimeFImpo = 1;                  // 0=Low,1=Med,2=High
    MimeImpo(MimeFName:MimeFImpo);
  
    // Add the Priority header
    MimeFPrio = 1;                  // 0=Non-Urgent,1=Normal,2=Urgent
    MimePrio(MimeFName:MimeFPrio);
                                                                      
   
    // Add the Sensitivity header, etc.
    MimeFSens = 0;                  // 0=Normal,1=Personal,2=Private
    MimeSens(MimeFName:MimeFSens);
   
    // Add the header
    //     "Content-Type: MULTIPART/MIXED;"
    //     followed by the "BOUNDARY" parameter
    MimeMultiP(MimeFName);
   
    // Imbed Document (HTML) Into email
    //      ImbAtt = 1 will imbed
    //MimeFName = '/mmail/mime/tempeml2.txt';
    FromFName = Fname;
    ImbAtt    = 1;
    ContType  = 'text/html';
    BinFlag   = ' ';
    MimeImbAtt(MimeFName:FromFName:ContType:BinFlag:ImbAtt:ImbAttCid);
 
    // Attach an image / Ready for Imbedding
    //      ImbAtt = 1 will imbed
    //MimeFName = '/mmail/mime/tempeml2.txt';
    FromFName = '/mmail/mime/hylogo.gif';
    ImbAtt    = 2;
    ContType  = 'image/gif';
    BinFlag   = 'Y';
    ImbAttCid = 001;
    MimeImbAtt(MimeFName:FromFName:ContType:BinFlag:ImbAtt:ImbAttCid);

    // Close the MIME file
    MimeClose(MimeFName);
                                                                      
    // E-mail the MIME message
    FromAddr = FRAD;
    CpfID=SendMail(MimeFName:FromAddr:ToAddr:ToDist);
                                                          
   *InLr = *On;                                           
  /End-Free






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Easy400Group/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to