Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

TechTip: JavaMail Is It!

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

  • TechTip: JavaMail Is It!

    ** This thread discusses the article: TechTip: JavaMail Is It! **
    ** This thread discusses the Content article: TechTip: JavaMail Is It!0

  • #2
    TechTip: JavaMail Is It!

    ** This thread discusses the article: TechTip: JavaMail Is It! **
    Do you have a version of the save file that would restore back as far as v4r5? Thanks Jonathan

    Comment


    • #3
      TechTip: JavaMail Is It!

      ** This thread discusses the article: TechTip: JavaMail Is It! **
      I tried to change JavaMailwithAttachment.java slightly, to expect a comma delimited list of filenames to come in the filename parm. Then in the sendMail method, I executed the following statement; String[] filenames = filename.split(","); Then I ran your SendMail RPG program, and received the following error; received Java exception "java.lang.NoSuchMethodError: split split is a method of the java.lang.String class, and package java.lang is included by default in each Java program, right? So why doesn't it recognize spilt as a valid method? I can run the program on my desktop, and the split function works fine. The version on the iSeries compiled okay, with no complaints about the split method. What gives?

      Comment


      • #4
        TechTip: JavaMail Is It!

        ** This thread discusses the article: TechTip: JavaMail Is It! **
        Update: I can call JavaMailwithAttachment from the QShell command line, like this; java JavaMailwithAttachment jdoe@yahoo.com jdoe@yahoo.com jdoe@yahoo.com subject text /pdf/file1.pdf,/pdf/file2.pdf and the program works fine. I have no problem with the split method. I receive the email, with 2 file attachments.

        Comment


        • #5
          TechTip: JavaMail Is It!

          ** This thread discusses the article: TechTip: JavaMail Is It! **
          When you get the NoSuchMethodError, that means your JVM is Java 1.3 (or earlier). When you don't get it, that means your JVM is Java 1.4 (or later). The split() method was added to String in Java 1.4. So that means the RPG version uses Java 1.3 and the QShell version uses Java 1.4.

          Comment


          • #6
            TechTip: JavaMail Is It!

            ** This thread discusses the article: TechTip: JavaMail Is It! **
            Hi Jonathan, Sorry on V5R3 I can only go back to V5R1 Kind regards - Jan

            Comment


            • #7
              TechTip: JavaMail Is It!

              ** This thread discusses the article: TechTip: JavaMail Is It! **
              Hi Jonathan, If you want I can send you all the source files in text format and then you can FTP and recompile it yourself - but to do that I need an email from you. Kind regards - Jan

              Comment


              • #8
                TechTip: JavaMail Is It!

                ** This thread discusses the article: TechTip: JavaMail Is It! **
                Thanks Paul. I created a SystemDefault.properties file in directory QIBMUserDataJava400 to set the JVM version to 1.4 and the program works as intended now. If anyone else is interested in doing this, I created a file named SystemDefault.properties and added the 3 lines shown below.
                Code

                Comment


                • #9
                  TechTip: JavaMail Is It!

                  ** This thread discusses the article: TechTip: JavaMail Is It! **
                  Hi Jan I am impressby seeing your article well thanks alot for making it so simple. I am facing one problem while i am attaching the file it is giving error Attachment file not found But according to me i am writting the correct path /QDLS/KK/QPSUPRTF.PDF. Can you please guide me on this. I tried to send the messae without the attachment it is going fine. Thanks in advance Kapil

                  Comment


                  • #10
                    TechTip: JavaMail Is It!

                    ** This thread discusses the article: TechTip: JavaMail Is It! **
                    Hi Ronnie, Was it possible for you to share the changed program? All the best - Jan

                    Comment


                    • #11
                      TechTip: JavaMail Is It!

                      ** This thread discusses the article: TechTip: JavaMail Is It! **
                      Do you know where to put a User ID/Password for the SMTP authentication that may be required by some servers? I am trying the lookup the info with searching for JAVAMAIL info. Thank you. BEDE!)

                      Comment


                      • #12
                        TechTip: JavaMail Is It!

                        ** This thread discusses the article: TechTip: JavaMail Is It! **
                        Hello Kapil, Did you find the solution ? I have the same problem. ErrorMessage is: call sendmail Java exception received when calling Java method. Java exception received when calling Java method (C G D F). D Java exception received when calling Java method (C G D F). D Application error. RNX0301 unmonitored by JAVAMAIL at statement 0000000156, instruction X'0000'. The call to *LIBL/JAVAMAIL ended in error (C G D F). D The call to *LIBL/JAVAMAIL ended in error (C G D F). D Application error. CEE9901 unmonitored by SENDMAIL at statement 0000015300, instruction X'0000'. Application error. CEE9901 unmonitored by SENDMAIL at statement 0000015300, instruction X'0000'.

                        Comment


                        • #13
                          TechTip: JavaMail Is It!

                          ** This thread discusses the article: TechTip: JavaMail Is It! **
                          Hello Kapil, How did you resolve the problem of attaching a file using JAVAMAIL? I am getting the same error code 104 and "File not Found!" message. Thanks Koff.

                          Comment

                          Working...
                          X