Mail.jar javabeans runs in beans but not in browser

I have added the mail.jar to java beans and have written a program to access smtp mail
The program compiles and runs ok in the beans development client but when i try to run it outside of beans in a web browser it wont run.
If I then remove the Mail part from the program it will run outside of beans.
I have added the mail.jer to the library within beans
The exception im getting points to the Mail.jar being missing.
Is there any other way to register the mail.jar with java beans or even with the javac compiler.
Thanks in advance

I include the full code im trying to get to work outside of the design environment. I tried adding the path of the mail.jar to the html path but it did absolutely nothing. I cannot find any reason why this code works in the designer and not outside of it. Works great in and out of the designer without the mail.jar library. Once the mail.jar library is there it will only work in the designer. I would have thought during the packaging process the designer would pass over all of the relative files and settings ready for deployment as it does with running in the designer but apparently not.
package request;
import java.awt.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class request extends java.applet.Applet{
     Button sendrequest,clear;
     TextField tex1,tex2,tex3,tex4,tex5;
@Override
     public void init(){
          setLayout(new GridLayout(6,2,2,5));
          add(new Label("Customer Name"));
          tex1=new TextField(22);
          add(tex1);
          tex2=new TextField(22);
          add(new Label("Account Number"));
          add(tex2);
          tex3=new TextField(22);
          add(new Label("Viewing Card Number"));
          add(tex3);
          tex4=new TextField(22);
          add(new Label("Request Type"));
          add(tex4);
          tex5=new TextField(22);
          add(new Label("Request Reason"));
          add(tex5);
          sendrequest = new Button("Send Request");
          add(sendrequest);
          clear=new Button("Clear");
          add(clear);
@Override
     public boolean action(Event evt,Object arg){
          if(evt.target instanceof Button){
try {
makechoice((Button) evt.target);
} catch (Exception ex) {
Logger.getLogger(request.class.getName()).log(Level.SEVERE, null, ex);
               return true;
          } else return false;
     void makechoice(Button b) throws Exception{
          if (b==sendrequest){
               String mess=null;
               Date date;
               date=new Date();
               mess=date.toString() + "\r\n";
               mess=mess + "Customer Name: "+ tex1.getText() + "\r\n";
               mess=mess + "Account Number: "+ tex2.getText() + "\r\n";
               mess=mess + "Card Number: "+ tex3.getText() + "\r\n";
               mess=mess + "Request Type: "+ tex4.getText() + "\r\n";
               mess=mess + "Request Reason: "+ tex5.getText() + "\r\n";
postmail(mess);
}else {
               tex1.setText("");
               tex2.setText("");
               tex3.setText("");
               tex4.setText("");
               tex5.setText("");
void postmail(String mess) throws MessagingException
boolean debug = false;
String recipient="YOUR EMAIL ADDRESS HERE";
String subject="change request";
String from="YOUR EMAIL ADDRESS HERE";
//Set the host smtp address
Properties props = new Properties();
props.put("mail.smtp.host", "YOUR SMTP SERVER ADDRESS HERE");
// create some properties and get the default Session
Session session = Session.getDefaultInstance(props, null);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress addressTo = new InternetAddress(recipient);
msg.setRecipient(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(mess, "text/plain");
Transport.send(msg);
}

Similar Messages

  • Using Windows: Send to -- Mail recipient, msg is sent OK, but not saved in Sent folder, with err msg about it. Sending from within Thunderbird: msg saved OK.

    When using Windows 8.1 context menu: Send to --> Mail recipient, message is sent OK, but not saved in Sent folder, with error massage: There was an error saving the message to Sent. Retry? (selecting Retry doesn't help).
    Similar issue happens when I open a ".eml" file and Reply of Forward it.
    When composing a new message from within Thunderbird, all is OK, including saving in the Sent folder.
    Already tried:
    Compacting the Sent folder.
    Compacting all folders of the account.
    Uninstall Thunderbird and install the latest version (31.6.0).

    When using Windows 8.1 context menu: Send to --> Mail recipient, message is sent OK, but not saved in Sent folder, with error massage: There was an error saving the message to Sent. Retry? (selecting Retry doesn't help).
    Similar issue happens when I open a ".eml" file and Reply of Forward it.
    When composing a new message from within Thunderbird, all is OK, including saving in the Sent folder.
    Already tried:
    Compacting the Sent folder.
    Compacting all folders of the account.
    Uninstall Thunderbird and install the latest version (31.6.0).

  • I upgraded to lion today and just realized I am not receiving any mail. I can send out but not receive. i'm using a POP Road Runner account. Any help appreciated.

    I just upgraded to Lion today and realized I'm not receiving any mail. I can send out but not receive. I am using a POP server Road Runner acct. Any help would be appreciated.

    Try Mail->Window->Connection Doctor.  If there is a problem reported, try:
    Open Mail->Preferences and check your settings.
    If you still have a problem, Copy your settings (screen capture ⇧⌘4), delete account, and re-setup account

  • JAR Executable works in netbeans but not under Dos?

    Hi all,
    I have created a jar executable and it works fine in netbeans(it was not created in netbeans) but I can't get it to run on the command line. If I type java ClassName.MainClass it will run but not using the command java JarFile.jar or java -jar JarFile.jar
    Any help would be most appreciated.

    When creating the manifest file did you add a carriage return at the end of the manifest? e.g.
    Main-Class:Hello.class
    (carriage return here on new line)
    I think it runs into problems if you dont add a carriage return ( a new blank line after manifest).
    Hope this helps
    Riz

  • Mail stopped working on iPad & iPhone, but not G5, after installing iOS 7.

    Here we have a G5, an iPhone-4 and an iPad all linked to the same POP account.  Mail fetching on all three devices had been working fine. 
    Earlier this week (10/23 or 10/24), however, Mail on both the iPhone and the iPad quit working shortly after our having installed iOS 7 on each of them.   This could be a coincidence, but Mail on a G5 running 10.5.8 linked to the same account is still fetching and sending mail just fine.
    Every time we swipe down on the message list (the gesture to fetch new mail) in Mail on the iPad, an error message appears,
    Cannot Get Mail
    The user name or password for
    "Primary Mail Account" is incorrect
    Settings   |    OK
    An analogous gesture on the iPhone produces the same message.
    But Mail on the G5 (running 10.5.8) still works fine to fetch mail from the same POP account.
    Here are some details:
    About two weeks ago, we installed iOS 7 on the iPad and the iPhone.  Mail continued to work after the installation.
    About a week later, last Wednesday, 10/23, the iPad went through a spontaneous installation event, in which the multilingual series of "Hello!" images familiar to those who install Mac operating systems floated across the screen.  Apparently, this event installed iOS 7.0.3.  There followed a short series of initialization dialogs, then everything seemed to work OK.
    Except that Mail wasn't working.  This could be a coincidence, but Mail on this iPad has not worked since last Wednesday.  The last message received is dated last Wednesday.
    We don't know whether the iPhone went through a similar event, but Mail quit working on it, as well.  Mail on this iPhone now gets the same message, above, as on the iPad.  The last message received by the iPhone was last Thursday, 10/24.  The iPhone's iOS is now 7.0.2.  The iPhone says that iOS 7.0.3 is downloaded, but not yet installed. 
    We compared the settings for Mail on the G5, on which Mail is still working, against the settings on the iPad and the iPhone.  They all seem pretty much the same.
    Have you heard of anyone else with this problem, or might you have an idea how to research it?
    --Gil

    That worked!  A couple of notes for anyone with the same problem:
    I thought I'd be clever and create a new account before deleting the old one.  That didn't work, as "Settings" kept insisting that the account had already been created.  I had actually to delete the old account and create a new one from nada.
    I was careful to write down all the settings parameters first.  Even so, it took a few tries to get everything spelled right.  Fortunately, "Settings" checked everything carefully and its messages pointed to the right places.
    I still got the same error message the first time i relaunched Mail.  However, this time I chose the "OK" option.  Since then and thereafter it seems to be working.
    Thanks for your help, lizdance40.
    --Gil

  • IMAP Mail question (d/l to MacPro but not MBP)?

    i have a ton of email accounts and have a really dumb question.
    i am accessing all of these accounts via IMAP on my Mac Pro my MacBook Pro and my iPhone. this is great since i can delete emails from my Mac Pro where i work a lot of the time and they will no longer clutter up my mail on my other devices. it obviously has other benefits in that i can see it all the same on all devices.
    i am wondering if there is a setting in Mail that downloads the email to my LOCAL HARD DRIVE and if so if i can check this for the Mac Pro but not for the MacBook Pro. i have 2 TB HD's on the Mac Pro but the laptop is running out of space with just 250 GB.
    i know this database is a big honking spacehog so i just got to thinking and wanted to ask.
    also, does anyone know if having Thunderbird email client and/or Sparrow email client on both of these computers causes large databases for each of these software programs as well? if so i should probably also delete all of this off the laptop.
    TIA

    Yes.
    In Mail->Preferences->Accounts, select the IMAP account you're concerned with.  In the advanced tab, there is a "keep copies of messages for online viewing" setting.  Choose "All messages and their attachments" on your Mac Pro, and choose something else that's a better fit in the list on your MacBook Pro.
    Also, yes, every IMAP client has its own local database.

  • JAR files under WEB-INF but not in lib directory

    I am working with JDeveloper 10g and I have several jar files under WEB-INF/lib and other under WEB-INF/libEst.
    I have add this libraries to Project properties > Paths and it works fine when I run my aplication in local environment, but it fails when I deploy and run in the server.
    I have configured our deploy file to include these WEB-INF/libEst jar files, but when I deploy to our server, it seems to be that this classes included in these jar files are not reachable and they cannot be loaded and throw a ClassNotFoundException.
    Is it possible to have jar files under any WEB-INF subdirectory distinct of /lib?
    Why is it working in local but not in server?
    If someone can help me to configure this in order to deploy in server, I will be very grateful.
    Thanks a lot,
    Antonio.

    Hi Antonio,
    I think this document is what you are looking for: http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-servlet-warmanifest.html
    .. your manifest entries would look like
    Class-Path: WEB-INF/libExt/<jarName1>.jar, WEB-INF/libExt/<jarName2>.jar, ...
    Let me know if this works for you.
    thanks,
    Harsha

  • I want a user to use only import, it run with export but not import

    Hi,
    i create a user for use only for import and for export.
    batch_export with exp_full_database role <- It run
    batch_import with imp_full_database role <- don't run
    P:\>sqlplus batch_export/batch
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:21:58 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-00604: une erreur s'est produite au niveau SQL rÚcursif 1
    ORA-20000: Connexion refusee
    ORA-06512: Ó ligne 41
    Entrez le nom utilisateur :
    P:\>sqlplus batch_import/batch@rfsage
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:03:36 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ConnectÚ Ó :
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    the trigger as run
    create or replace trigger batch_export.check_connexion after logon on database
    declare
    V_MODULE SYS.V_$SESSION.module%TYPE;
    V_TERMINAL SYS.V_$SESSION.terminal%TYPE;
    V_SID SYS.V_$SESSION.SID%TYPE;
    V_SERIAL SYS.V_$SESSION.SERIAL#%TYPE;
    V_COMMAND varchar2(100);
    V_CURRENT_USER varchar2(20);
    V_CURRENT_SID SYS.V_$SESSION.SID%TYPE;
    cursor connexion is
    select substr(module,1,7) module, substr(terminal,1,12) terminal, sid, serial# from v$session T1 where schemaname='BATCH_EXPORT';
    cursor ID_CUR is
    select user from dual;
    cursor SID_CUR is
    select SYS_CONTEXT('USERENV','SID') sessionid from dual;
    --select SYS_CONTEXT('USERENV','CURRENT_USERID') current_userid from dual;
    Begin
    open SID_CUR;
    loop
    fetch SID_CUR into V_CURRENT_SID ;
    EXIT WHEN SID_CUR%NOTFOUND;
    dbms_output.put_line('V_CURRENT_SID:'||V_CURRENT_SID);
    end loop;
    close SID_CUR;
    open ID_CUR;
    loop
         fetch ID_CUR into V_CURRENT_USER ;
         EXIT WHEN ID_CUR%NOTFOUND;
         if V_CURRENT_USER='BATCH_EXPORT' then
         open connexion;
         loop
              fetch connexion into V_MODULE,V_TERMINAL,V_SID,V_SERIAL ;
              EXIT WHEN connexion%NOTFOUND;
              if V_MODULE<>'EXP.EXE' then
              dbms_output.put_line('V_SID:'||V_SID);
              dbms_output.put_line('V_CURRENT_USER:'||V_CURRENT_USER);
                   if V_CURRENT_SID=V_SID then
                   dbms_output.put_line('MODULE:'||V_MODULE);
                   RAISE_APPLICATION_ERROR (-20000,'Connexion refusee');
                   end if;
              end if;
         end loop;
         close connexion;
         end if;
    end loop;
    close ID_CUR;
    End;
    as the same for import user.
    I try with role in trigger but it don't, i see this in forum Oracle.
    But i think EXP_FULL_DATABASE have not DBA rule, but IMP_FULL_DATABASE have.
    How i do this ?
    I want just to use a user to imp utilities, but not connexion in sqlplus.
    Thanks for your help
    Christophe

    thanks for your help.
    it run !
    for example :
    as the system user
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'CONNECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    SQL> grant create session to batch;
    Autorisation de privilèges (GRANT) acceptée.
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'SELECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    the result
    oracle@debian:~$ sqlplus batch/batch;
    SQL*Plus: Release 10.2.0.1.0 - Production on Mar. Août 22 06:53:00 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à :
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select user from dual;
    SP2-0544: Commande "select" désactivée dans le profil utilisateur du produit
    SQL>
    oracle@debian:~$ exp batch/batch owner=batch file=test.dump
    Export: Release 10.2.0.1.0 - Production on Mar. Août 22 06:54:32 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export fait dans le jeu de car WE8DEC et jeu de car NCHAR AL16UTF16
    le serveur utilise le jeu de caractères WE8ISO8859P1 (conversion possible)
    Prêt à exporter les utilisateurs spécifiés ...
    . export des actions et objets procéduraux de pré-schéma
    . export des noms de bibliothèque de fonctions étrangères pour l'utilisateur BATCH
    . export des synonymes de type PUBLIC
    . export des synonymes de type PRIVATE
    Thanks for all

  • Mail showing unread messages in dock but not in application

    At first it was just on one of my computers but now it is on all three of my computers and they each show a different number. I have dleeted my mail accounts and then readded them in mail preferences and that works for a sec but not for very long. it is very annoying....

    In System Preferences > Notification Center, select Mail in the left hand column, and check the box, "Badge app icon" toward the bottom on the right.

  • Query running in Quality but not in Production

    Hi Folks,
    we are running a query AQICSDUSERS=====MOVEMENTLIST4= which used to get executed previously,but all of a sudden now after running for an hour or so it is coming back to  sap easy access screen without displaying the report.It is running and giving the report in Quality but not in Production.
    What could be the reason?
    K.Kiran.

    Hi Folks,
    From DUMP I got this:-
    <b>You should usually execute long-running programs as batch jobs.
    If this is not possible, increase the system profile parameter
    "rdisp/max_wprun_time".</b>
    I want to know how to increase the system profile parameter
    "rdisp/max_wprun_time".
    Thanks,
    K.Kiran.

  • Outgoing mail server will work on Iphone but not Mail on Macbook

    My POP account will send mail on my iphone no problem, but on the mail program on my macbook it times out. All the account information is identical. The mail program keeps telling the server does not support port 995, but on the Iphone it does. I have tried changing the port but it still won't work. Suggestions please!

    misilulu, outgoing mail uses the SMTP protocol on ports, 25, 587 (for submission only) and, in the case of SMTPS, port 465 (rarely used and deprecated).
    The POP is used for incoming mail on ports 110 or, in the case of POP over SSL, 993.
    If all the settings between your iPhone and your MacBook are the same and you are having problems sending outgoing email on your MacBook it is most likely because you are using the wrong port. If you are using port 25 then it is most likely that your ISP is blocking that port for all mail servers except their own. If that is the case try the mail submission port 587. If that doesn't work then try 465 as a last resort.

  • Non-UB runs on Intel but not as plugin?

    I was under the impression that AU was the requisite format to run a plugin within Logic and universal binary was additionally required for anything to run on Intel macs. Zero-G Vocal Forge is stated as being AU but not necessarily UB. The stand alone version works fine on my Intel iMac however, the plugin does not show up in my Logic 8 or Ableton Live 6 plugin menus. I tried the AU scanner in Logic to no avail. The component does show up in the correct folder. I thought that if something wasn't UB, it just wouldn't run at all on an intel Mac but it runs fine, just not as a plugin. I wouldn't even bother asking, except that the stand alone is operational. Will I have to wait for UB, or am I doing something wrong? Thanks. - Emile

    Hi,
    The reason the Stand=Alone version of your plugin works, is that under an Intel mac, there is a shell, called "Rosetta". What this does, is that when you open a non-Intel, or non-Universal Binary version of a software, the computer tries to open it, and runs it inside the Rosetta shell. This is not a very efficient way of running software, but it allows you to open things that are not yet Universal Binaries.
    The Audio Unit portion of your plugin, is NOT Universal binary, and because it is not, it does not show up when you open Logic, which IS Universal binary. Logic is not being run under the Rosetta shell, because it does not need to.
    If you want to use it as a Plugin-In inside of Logic, you will have to wait until the company releases a UB version.
    Cheers

  • Semantics of running with DB_INIT_TXN but not DB_INIT_LOCK

    What are the semantics of enabling the logging and transactional subsystems, but not the locking subsystem? Ideally this would give the write ahead logging properties of running with transactions, but no isolation or atomicity guarantees. Is this, in fact, what will happen, or will this configuration lead to something else?
    Thanks!

    I'm not totally clear here though, does BDB provide isolation and atomicity guarantees even if I don't enable the locking subsystem? No exaclty. BDB provides those guarantees to ensure that every single method in the API works well. But it doesn't take care of concurrency control for your own application. I guess it might help you understand better if you refer to http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/intro.html.
    That seems odd as it would have to be using some internal locking system for that. What I'd like is for BDB to provide me write ahead logging but no concurrency control and I'll provide my own concurrency control above BDB so I can ensure that only one thread will be reading/writing a key at the same time. Does DB_INIT_TXN, DB_INIT_LOG give me that?Yes, you could use DB_INIT_TXN, DB_INIT_LOG and write your own concurrency control.
    Regards,
    Emily Fu, Oracle Berkeley DB

  • App is running on simulator but not in Playbook device

    Hi,
    I have developped an app that has been approved and it's present on app world.
    The app is running perfectly on the simulator but customers write reviews saying that they can't save data on the device and no error message is displayed.
    I have used AIR SDK and a SQLIte database.
    As I'm in Europe and Playbook is not available, I can't debug the app on a real device.
    Has anybody an idea about why the app work on the simulator but not on the real device.
    Thanks.

    Scocam - that's not a particularly helpful comment. A great deal of the apps in AppWorld have not been tested on the PlayBook yet as there ard a number of developers still waiting to receive their PlayBooks.
    If they live outside of North America then they have no other way of getting one except for waiting for RIM to ship them out. In the meantime, we use the simulators that RIM provide us and hope the apps behave the same on the real devices. This isn't always the case.
    But a great way to demonstrate your ignorance with an unhelpful pithy comment. Well done.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!

  • Mails receiving to Dropbox and disappearing but not receiving to SharePoint List in SP 2013:

    Previously things were working fine, after making changes in Exchange that they have created MX records and some needed stuff to receive emails from external to SharePoint list.
    Internally with in corporate domain, SharePoint list is about to receive the mails without any issues, but when we send mail from external mail (Gmail) to SharePoint lists , mails are coming to Drop box and in which those messages are getting disappeared
    but not coming to SharePoint list. Please help me out in this issue
    Steps Done:
    IIS Reset
    Restarted timer services
    Restarted SMTP services
    Cleared the farm cache
    Rebooted the server
    But no luck.
    Thanks, Ram Ch

    Have you mentioned Drop folder path under
    Central Administration-->Configure Incoming E-Mail Settings --> E-mail drop folder
    and also On the WFEs, did you update the relay setting(IPs of exchange server)?
    check this for more details:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/be6656f4-6a96-4841-b535-82e6132ca9fa/emails-disappering-from-drop-folder-but-not-appearing-in-sharepoint-listlibrary?forum=sharepointgeneralprevious
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

Maybe you are looking for

  • Applet error with changing variable data after several runs....

    Can anyone give some advice on the following: I have a java card program running on a gsm sim: The program makes use of member variables which contain data that is reused and rewritten all the time. The member variables are all declared as (for examp

  • What can Extract Tables from PDF

    Hi All, I have a bunch of PDF docs with tabular data in them which I need to extract to process and run calculations on. Is there anything out in the world (preferablly free, open source) that is able to get tabluar data out of PDFs into a more reada

  • Reset signature field

    I'm having a problem with reseting my signature fields. It seemed to work fine in reader X but not XI. I have a form with multiple signature fields, and each time a signature field is signed then it locks certain fields. Now when I reset these signat

  • Toggling in while loop

    Hey ! I want to fit the scale of a graph thru button and undo the fit(when button pressed again logic 0 is latched) so that i can adjust it manually. But  in while loop i cant latch the button's logic ...Any idea how to do this... Regards, DeWalker A

  • Cobras export Error

    We are upgrading from Unity Conncection 7.X MCS to 9.1 on UCS and we get the following error right before the import completes.  The import completes successfully but I just want to make sure we won't have any issues given the following error: [Threa