ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

sendind email by rpgle/cl program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: sendind email by rpgle/cl program

    Post up your code blocks with the parms ...
    Greg Craill: "Life's hard - Get a helmet !!"

    Comment


    • #17
      Re: sendind email by rpgle/cl program

      oh I got it actually i have created another one cl for calling my pgm and now it work correctly...
      thank you so much.

      Comment


      • #18
        Re: sendind email by rpgle/cl program

        Hi SIMRAN:

        See this post about CL paramaters being > 32 characters.


        Wrap your CL in a command and call the command instead of the cl.

        Best of Luck
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment


        • #19
          Re: sendind email by rpgle/cl program

          thank you so much GLS
          my prog. is now correctly run

          Regards,
          simran

          Comment


          • #20
            Re: sendind email by rpgle/cl program

            Share some of the code with us....please

            jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #21
              Re: sendind email by rpgle/cl program

              i am posted here prog for sending mail to cust by cl....
              PHP Code:
              PGM        PARM(&INV &INVDT &MAIL &MAIL1 )
               
              DCL        VAR(&INVTYPE(*CHARLEN(10
               
              DCL        VAR(&INVDTTYPE(*CHARLEN(8)
               
              DCL        VAR(&MAILTYPE(*CHARLEN(50)
               
              DCL        VAR(&MAIL1TYPE(*CHARLEN(50
               DCL        
              VAR(&JOBTYPE(*CHARLEN(10
               
              DCL        VAR(&NBR)  TYPE(*CHARLEN(6
               
              DCL        VAR(&USERTYPE(*CHARLEN(10)
               
              CALL       PGM(NEWBPARM(&INV &INVDT 
                   
              RTVJOBA    JOB(&JOBUSER(&USERNBR(&NBR)                
                   
              ADDLIBLE   LIB(CVTSPLV5R1)                                
                   
              MONMSG     CPF0000                                        
                CVTSPLSTMF FROMFILE
              (NewoTOSTMF(INVOICE.PDF) +          
                             
              TODIR('QDLS/FLD1') +                        
                             
              JOB(&NBR/&USER/&JOBSPLNBR(*LAST) +            
                             
              TOFMT(*PDFSTMFOPT(*REPLACE)                   
                   
              RMVLIBLE   LIB(CVTSPLV5R1)                                
                   
              MMAIL2008/EMLSTMF SUBJECT('INVOICE +  
                                FOR CUSTOMER'
              FROMNAME(SIMRAN) +         
                                
              FROMADDR('XYZ@YAHOOMAIL'TO(&MAIL/CUSTOMER/*TO +              
                                &MAIL1/CUSTOMER1/*TO  +                      
                                STMF('/QDLS/FLD1/INVOICE.PDF')          
              MONMSG(CPF0000)

              ENDPGM 
              regards,
              simran

              Comment


              • #22
                Re: sendind email by rpgle/cl program

                why bother using QDLS at all? with EMLSTMF the IFS is the better option.
                I'm not anti-social, I just don't like people -Tommy Holden

                Comment


                • #23
                  Re: sendind email by rpgle/cl program

                  I'm using QDLS and the SNDDST command over EMLSTMF because it is easier to format the email message body in a batch job that way. You can format the long message parameter with specific detail of the report as it is being generated, whereas with EMSTMF this information would have to be present in a source file before the job is run.

                  Comment


                  • #24
                    Re: sendind email by rpgle/cl program

                    Wow... return of the Zombie thread. Grab the Axe!

                    Your far better off to shy away from QDLS because of the limited size of names (8.3...icky).
                    One of the best ways I've found to send emails from the AS400 is RPGMail. The Info/documentation/and goodies are all at:

                    http://www.mowyourlawn.com/RPGMail.html

                    I've been using that for years and it works like a charm. You can use text files stored on the fly to populate the message body or subject. You can even send attachments from the root directory and call it whatever you will without worry of the 8.3 restriction on the file name.
                    All that said, hope it helps.

                    Comment


                    • #25
                      Re: sendind email by rpgle/cl program

                      Originally posted by Fady View Post
                      I'm using QDLS and the SNDDST command over EMLSTMF because it is easier to format the email message body in a batch job that way. You can format the long message parameter with specific detail of the report as it is being generated, whereas with EMSTMF this information would have to be present in a source file before the job is run.
                      what exactly is so hard about writing the info to a source file in your program???
                      I'm not anti-social, I just don't like people -Tommy Holden

                      Comment

                      Working...
                      X