MC Press Online Forum
Welcome, Guest
Please Login or Register.    Lost Password?
TechTip: JavaMail Is It! (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: TechTip: JavaMail Is It!
#119933
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 2 Years, 9 Months ago  
Do you have a version of the save file that would restore back as far as v4r5? <p>Thanks <p>Jonathan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119934
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 2 Years, 9 Months ago  
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; <p>String[] filenames = filename.split(&quot;,&quot;); &lt;p&gt;Then I ran your SendMail RPG program, and received the following error; &lt;p&gt;received Java exception &quot;java.lang.NoSuchMethodError: split &lt;p&gt;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&#039;t 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; <p>String[] filenames = filename.split(","); <p>Then I ran your SendMail RPG program, and received the following error; <p>received Java exception "java.lang.NoSuchMethodError: split <p>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?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119935
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 2 Years, 9 Months ago  
Update: I can call JavaMailwithAttachment from the QShell command line, like this; <p>java JavaMailwithAttachment This e-mail address is being protected from spam bots, you need JavaScript enabled to view it This e-mail address is being protected from spam bots, you need JavaScript enabled to view it This e-mail address is being protected from spam bots, you need JavaScript enabled to view it subject text /pdf/file1.pdf,/pdf/file2.pdf <p>and the program works fine. I have no problem with the split method. I receive the email, with 2 file attachments.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119936
pclapham@core-mark.com (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 2 Years, 9 Months ago Karma: 0  
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. <p>So that means the RPG version uses Java 1.3 and the QShell version uses Java 1.4.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119937
rpg@post.tele.dk (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 2 Years, 9 Months ago Karma: 0  
Hi Jonathan, <p>Sorry on V5R3 I can only go back to V5R1 <p>Kind regards <BR>
- Jan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119938
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 2 Years, 9 Months ago  
Hi Jonathan, <p>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. <p>Kind regards <BR>
- Jan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119939
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 2 Years, 9 Months ago  
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. <p><!--mccodelink_begin--> <BR>
<!-- do not remove --> <BR>
<hr width=50 align=left><small><a href='http://www.mcpressonline.com/mc/showcode@@.6b342a48/7' target='_blank'>Code</a></small> <BR>
<!--mccodelink_end-->
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119940
kapil1 (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 2 Years, 9 Months ago Karma: 0  
Hi Jan <p>I am impressby seeing your article well thanks alot for making it so simple. <p>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. <p>I tried to send the messae without the attachment it is going fine. <p>Thanks in advance <BR>
Kapil
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119941
rpg@post.tele.dk (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 2 Years, 8 Months ago Karma: 0  
Hi Ronnie, <p>Was it possible for you to share the changed program? <p>All the best <BR>
- Jan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119942
bede10@aol.com (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 2 Years ago Karma: 0  
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!)
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119943
francois999 (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 1 Year, 11 Months ago Karma: 0  
Hello Kapil, <p>Did you find the solution ? I have the same problem. ErrorMessage is: <BR>
call sendmail <BR>
Java exception received when calling Java method. <BR>
Java exception received when calling Java method (C G D F). <BR>
D <BR>
Java exception received when calling Java method (C G D F). <BR>
D <BR>
Application error. RNX0301 unmonitored by JAVAMAIL at statement <BR>
&nbsp;&nbsp;0000000156, instruction X'0000'. <BR>
The call to *LIBL/JAVAMAIL ended in error (C G D F). <BR>
D <BR>
The call to *LIBL/JAVAMAIL ended in error (C G D F). <BR>
D <BR>
Application error. CEE9901 unmonitored by SENDMAIL at statement <BR>
&nbsp;&nbsp;0000015300, instruction X'0000'. <BR>
Application error. CEE9901 unmonitored by SENDMAIL at statement <BR>
&nbsp;&nbsp;0000015300, instruction X'0000'.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119932
MC Press Web Site Staff (Admin)
Admin
Posts: 1061
graphgraph
User Offline Click here to see the profile of this user
TechTip: JavaMail Is It! 1 Year, 1 Month ago Karma: 1  
This is a discussion about <B>TechTip: JavaMail Is It!</b>.<p align='center'><a href=http://www.mcpressonline.com/mc? This e-mail address is being protected from spam bots, you need JavaScript enabled to view it @.6b33c711>Click here for the article</a>.</p>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119944
Guest.Visitor (Visitor)

Birthdate:
TechTip: JavaMail Is It! 1 Year, 1 Month ago  
Hello Kapil, <BR>
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. <p>Thanks Koff.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
   MC-STORE.COM