Ask help on javamail

When I run the following code, "javax.mail.NoSuchProviderException: No provider for Address type: rfc822" is throwed when it comes to the line "Transport.send(message);".
Does anyone can tell me the reason?
Thanks a lot!
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class HshSendMessage
public static void main(String[] a)
try
/* if(args.length < 5)
System.out.println("java com.psol.xslist.SendMessage" +
" [email protected] [email protected] mailhost.domain.com" +
" subject \"mail content\"");
return;
String args[]={"[email protected]","[email protected]","mail.hotmail.com","subject","You have a task!"};
          Properties props = System.getProperties();
          props.put("mail.smtp.host",args[2]);
     Session session = Session.getDefaultInstance(props, null);
//     if (debug)
          session.setDebug(true);
Message message = new MimeMessage(session);
InternetAddress from = new InternetAddress(args[1]);
InternetAddress to[] = InternetAddress.parse(args[2]);
message.setFrom(from);
message.setRecipients(Message.RecipientType.TO,to);
message.setSubject(args[3]);
message.setSentDate(new Date());
message.setText(args[4]);
Transport.send(message);
catch(MessagingException e)
System.err.println(e.getMessage());

Have you downloaded and installed Java Activation Framework from Sun?
You need the activation.jar in your classpath to have Java mail works, I think I have
this problem before and that solved it.
--lichudang                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • I have problem when updating the latest version of Pro-X, I tried for several times, so I uninstall and re-install it. It is unsuccessful to re-install the Pro-X and it direct me to ask help from CS,also showing this message: Exit Code: 6  Please see spec

    I have problem when updating the latest version of Pro-X, I tried for several times, so I uninstall and re-install it. It is unsuccessful to re-install the Pro-X and it direct me to ask help from CS,also showing this message: Exit Code: 6  Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW025, DW050 ... WARNING: DW024, DW025 ..., please advice me the step to re-install the Pro-X. Thanks

    Please follow Errors "Exit Code: 6," "Exit Code: 7" | CS5, CS5.5
    Do let us know if it worked.
    Regards
    Rajshree

  • I lost my aypad .. I bought it 2012.. I do not know I ask help Imel there smiling my life. I remember my account as a leash

    I lost my aypad .. I bought it 2012.. I do not know I ask help Imel there smiling my life. I remember my account as a leash
    <Email Edited by Host>

    Sorry to hear that. I hope you had a passcode, but sound like maybe not. Unfortunately, there is nothing anyone here can do to help you. I suggest you follow Apple's recommendations for what to do in this situation.
    Be sure to change all your passwords. and see here: http://support.apple.com/kb/HT5668

  • Help with javamail

    Hi,
    I am working with latest Jdev. I am developing a servlet that uses javamail. I also downloaded latest javamail and activation apis from sun, and configured the jdev project to look for the libraries.
    So, I have this error:
    Error(418,34): variable RecipientType not found in class Message
    I have checked everything: the import statements, and here is the code:
    Properties props = System.getProperties();
    props.put("mail.smtp.host", host);
    Session session = Session.getInstance(props, null);
    session.setDebug(false);
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setSubject(subject);
    message.setText(text.toString());
    Please Help!
    Thanks,
    Lorenzo Jiménez

    Check for the version of the java mail and the API Docs. You may be using a version for development and other that does not have such variable defined for running
    Hope it helps,
    Daniel Campelo

  • I ask help to come on Account!

    I do not know as to you to phone or be added!
    Login sab-31 already has tried all variants, come confidential a code I enter them for password replacement, and any result, all the same writes (excuse registration you the data are not valid...).
    I ask restore unblock Akaunt sab-31, send on a registration E-mail the correct password...
    Solved!
    Go to Solution.

    you may need to contact customer service in your case as the usual password reset option doesn't seem to work;
    http://community.skype.com/t5/General-Discussion/How-to-Contact-Skype-Customer-Service/m-p/431911
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

  • Ask help about  variable range

    1.if I define a variable at the start of the class: private JList flightsList;
    2.then write a method :public void doQuery( )
    String startAirport = (String)from.getSelectedItem();
    String endAirport = (String)to.getSelectedItem();
    String timeDate = date.getText();
    if( manager.getFlights(startAirport, endAirport,timeDate) != null )
         Flight [] flightQuery = manager.getFlights(startAirport, endAirport,timeDate);
         int length = flightQuery.length;
         String [] number = new String[length];
         System.arraycopy(flightQuery,0,number,0,length);
         //flightsList = new JList( number );
    3.then make a constructor,I want in the constructor invoke the method doQuery( ) ,then use
    code: flightsList = new JList( number );
         contents.add( new JScrollPane( flightsList) , BorderLayout.CENTER );
    I want to put arryaay number in the flightsList,then create a JScrollPane show the arraay number.
    But it does not work.I know it is the variable range,how to pass the number into the flightsList?
    I have thought about it for a long time.
    Please help me,thanks!

    I mean:
    example:
    public class look extends JFrame {
    //if I define a variable at the start of the class:
    private JList flightsList;
    //2.then write a method :public void doQuery( )
    String startAirport = (String)from.getSelectedItem();
    String endAirport = (String)to.getSelectedItem();
    String timeDate = date.getText();
    if( manager.getFlights(startAirport, endAirport,timeDate) != null )
    Flight [] flightQuery = manager.getFlights(startAirport, endAirport,timeDate);
    int length = flightQuery.length;
    String [] number = new String[length];
    System.arraycopy(flightQuery,0,number,0,length);
    //flightsList = new JList( number );
    3.then make a constructor,I want in the constructor invoke the method doQuery( ) ,
    public gui
    //use code
    flightsList = new JList( number );
    contents.add( new JScrollPane( flightsList) , BorderLayout.CENTER );
    in sort I want to put array number in the jlist( flightsList),then create a JScrollPane show the arraay number(number).
    //Your constructor assigns the private variable the value of what it is passed, then you can use it in other functions in the class.
    Is that what you are asking?
    no,I mean assingns a private variable,then write a method ,then invoke the method to put array number in the private variable.

  • Try to convert doc to PDF, Unable to find "Adobe PDF resourse files, Ask help

    Hi guys,
    I am tryng to convert word doc file to PDF by acrobat v9.0 pro, I got the message as "Unable to find "Adobe PDF resourse files", and "Acorbat could not open 'filename' because it is either not a supported file type or because the file has been damaged ...".  I did several times to run the installer to repair it,  and remove and re-installed several times with different folders  for the Adobe acrobat. I also did check the setting by "Preferences" under the item "Edit'. But nothing changed. I use it for generating and merging 1 or more doc files into a PDF file, so the micorsoft word which can make PDF file or use PDF printer is not useful for my object. Any ideas and helps? I really appreaciate anyone can give me help, Thanks a lot.
    John

    You don't need Acrobat for this at all.
    If you select "Print..." there is a "PDF..." button in the lower left corner of the dialog. Click the button and select "Save as PDF..." or you can do "Open in Preview..." and save from there.
    OS X has had the ability to generate PDFs since the 10.0 days. The whole graphics infrastructure is based on PDFs. You have no need whatsoever for Acrobat on the machine to do this.

  • Help needed : javamail Too many simultaneous connections

    Hello
    i'm using javamail to develop a webmail
    i've created a service Class , and all things works well , but i have a serious problem when i browse my webmail ( viewing folders: inbox / spam / etc or messages) i get an error saying :
    Too many simultaneous connections. (Failure)
    i know that the imap server dosen't support more than 10 simultaneous connections.
    But i can't say to users using my webmail to do not a lot of actions !!! , and also when i use thunderbird for example it works fine without errors even if i do a lot of actions/connections
    How can i solve that problem ?
    Thanks
    A1 OK [email protected] authenticated (Success)
    A2 CAPABILITY
    * CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
    A2 OK Success
    A3 SELECT INBOX
    DEBUG: no connections in the pool, creating a new one
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
    * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
    * OK [UIDVALIDITY 616267767]
    * 7 EXISTS
    * 0 RECENT
    * OK [UNSEEN 1]
    * OK [UIDNEXT 90]
    A3 OK [READ-WRITE] INBOX selected. (Success)
    A4 STORE 1 +FLAGS (\Seen)+
    +* OK Gimap ready for requests from MyIP 24if2631473eyx.55+
    +A0 CAPABILITY+
    +* 1 FETCH (FLAGS (\Seen))+
    +A4 OK Success+
    +* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY+
    +A0 OK Thats all she wrote! 24if2631473eyx.55+
    +A1 LOGIN myemail mypwd+
    +A1 OK [email protected] authenticated (Success)+
    +A2 CAPABILITY+
    +* CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1
    A2 OK Success
    A3 SELECT INBOX
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
    * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
    * OK [UIDVALIDITY 616267767]
    * 7 EXISTS
    * 0 RECENT
    * OK [UNSEEN 1]
    * OK [UIDNEXT 90]
    A3 OK [READ-WRITE] INBOX selected. (Success)
    A4 STORE 1 +FLAGS (\Seen)
    * OK Gimap ready for requests from MyIP 23if2388548eya.46
    A0 CAPABILITY
    * 1 FETCH (FLAGS (\Seen))
    A4 OK Success
    * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY
    A0 OK Thats all she wrote! 23if2388548eya.46
    A1 LOGIN custom.infoma1 mypwd
    A1 NO [ALERT] *Too many simultaneous connections. (Failure)*
    A2 LOGOUT
    * BYE Logout Requested 23if2388548eya.46
    A2 OK Quoth the raven, nevermore... 23if2388548eya.46
    A4 CLOSE
    A4 CLOSE

    Thunderbird supports disconnected or offline operation. It can disconnect from the server and then reconnect later
    and synchronize its state, so that you never know it was disconnected.
    You can do that too, but it's a lot of work.
    For webmail, the simplest approach is usually to have only one folder open at a time for each user.
    If your IMAP server is limiting you to 10 connections total, across all users, get a new IMAP server.

  • Ask help for OID on Linux

    I installed OID which come from the download version of Oracle 8i 8.1.7 on redhat linux 6.2. I use universal installer installed the software code and run postcfg script in $ORACLE_HOME/ldap/postcfg to generate the database and LDAP schema. After correct some
    bugs manually in the postcfg(it is better to add one sentence of oidmon -start) and bugs in oidadmin(script in $ORACLE_HOME/bin, one is it point to a wrong place of jre, the other is it use a switch that only worked on sparc), I finally started the oidadmin.
    BUT, I still can not login the OID from oidadmin. Can any guy kind give me some info on what is the initial password for oidadmin of OID? I have tried all combos that listed on the on-line help, like: cn=orcladmin, oracladmin, etc. it doesn't work. I also use sqlplus as system to search it in the tables
    of the OID database, but find nothing.
    Thanks for any info or hint!
    null

    Hello:
    Sorry it took so long to respond to your question. I was exhibiting OID at AppsWorld in Paris and New Orleans for the past 2 weeks.
    Assuming you have followed the installation procedures from the "OID Installation Guide" there is one small bug patch that needs to be applied to the Linux versions. You can obtain a copy of this patch from the Oracle Metalinks web site:
    http://www.oracle.com/support/metalink/index.html
    Assuming that OID is up and running you should be able to start a gui JAVA tool from the command line prompt by typing in "oidamdin" or from your Linux Window console. The super user account name is "orcladmin" and the default password is "welcome". The default port number is 389. Also make sure you put in the host name of your machine.
    Let me know if any of this helps. If not Ill try to help you reinstall OID to make sure it is installed properly. I am unable to fully understand where you are stuck from your description of the problem.
    thanks,
    Jay
    null

  • Ask help about detail explaination on "subtotal" field in pricing procedure

    Hi, everybody:
       I wanna get detail explanation about "subtotal" field in pricing procedure configuration. I have caught basic thoery on this field usage. However, I'm unclear on its option items, for exapmle, Dcopy value to XWORKD, Ecopy value to XWORKF and so on. I can't find where these kinds of objects are stored and in which suituation we have to select one of them in configuration.
      Another question is how the standard programe uses KOMP to store condition results and transfer them to relative modules, for example, A--carry over price to KOMP-CMPRE.
       Hoping get answer or some documents from you on this issue. If you have reference documents sent to me, please send to my e-mail box: [email protected]
      Tks!
    Justin

    dear justin
    Sub-total:     
    The value of this field determines where the value of the sub-total is gong to be stored in data base
    Sub-total – 1     : KOMP – KZWI-1
    Sub-total - 2     : KOMP – KZWI-2
    rewards if it helps
    siva

  • Ask help About Create Direct Database Request

    Hi, all.
    When I using the Create Direct Database Request, how can I specify a variable which can used to receive multiple input value?
    My SQL like this:
    select... from table t1 where t1.c1 in('@{v_c1}{001})
    where, v_c1 is the variabe name, 001 is the defaut value of the variable.
    But, it doesn' work.
    If it's the systax error, then how can I correct it?
    Thank you in advance.

    Hi katherine,
    Your connection pool should look like this "DEV_BI"."Connection Pool"
    Second thing is go to Administration/Manage privileages/Direct database privileage is there.
    If you want to use variables into your SQL query follow this link
    http://bintelligencegroup.wordpress.com/2010/08/26/how-to-use-the-presentation-variable-in-direct-database-request/
    Hope it helps you.
    By,
    KK

  • Asking help for INSERT, DELETE, UPDATE, SELECT

    I have to build a program that is like a bridge from the dabase hsqldb and the final user.
    So the user has the options of SERCH, EDIT, INSERT or DELETE a register/field/row whatever.
    Remember that the values are entered by the user, so I don't know the field to be edited, deleted, etc...
    I would thank a lot if you could put some code to do all these operations.
    But please, if you won't post the codes please don't post nothing else.
    I need the example codes!
    Thanks if you can give me a hand.

    I Just need to understand what's wrong with my code:
    // call this when user presses insert button...
    public void insertRegister() {
    String title = "Inserting new register...";
    String tempId = JOptionPane.showInputDialog(null, "Enter ID Client:", title, 3);
    int id = Integer.parseInt(tempId);
    String name = JOptionPane.showInputDialog(null, "Enter name Client:", title, 3);
    String tel = JOptionPane.showInputDialog(null, "Enter tel Client:", title, 3);
    try {
    // Setting up the PreparedStatement
    PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO CLIENTS (id_client, name_client, tel_client) VALUES(?,?,?)");
    // Now we insert the real values for PreparedStatement and execute it!
    preparedStatement.setInt(1, id);
    preparedStatement.setString(2, name.toUpperCase());
    preparedStatement.setString(3, tel);
    preparedStatement.executeUpdate();
    catch(SQLException s) { s.printStackTrace(); }
    // call this when user presses delete button...
    public void deleteRegister() {
    try {
    // Setting up the PreparedStatement
    PreparedStatement preparedStatement = connection.prepareStatement("DELETE FROM CLIENTS WHERE id_client = ?");
    String tempId = JOptionPane.showInputDialog(null, "Enter ID Client to be deleted:", "Deleting register...", 3);
    int id = Integer.parseInt(tempId);
    preparedStatement.setInt(1, id);
    preparedStatement.executeUpdate();
    catch(SQLException s) { s.printStackTrace(); }
    // Of couse I don't want anyone coding for me...
    // But if I'm not asking too much, just please someone tell me what's wrong with my code, and how to fix it. That's all.

  • Ask help for install solaris 7

    When I Install solaris 7 in my server sun140(ultra 1), This
    Message display on my screen:
    ---------------------------------------hereinafter----------------------------------
    ok boot
    Boot device:net File and args:
    Timeout waiting for ARP/RARP packet
    Automatic network cable selection successed:Using TP Ethernet Interface
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    Timeout waiting for ARP/RARP packet
    ----------------------------------------hereinbefor-------------------------------
    What's wrong? What shalld I do.
    Thanks
    **** merry christmas and Happy New Year***

    Hi,
    At the ok prompt, type 'printenv' make sure the last variable 'diag-switch' is set to false. If its true, set it by using setenv diag-switch? false
    also, what is your boot-device set to? is it disk, can you see your disk?
    try 'probe-scsi' to make sure you have a disk to boot off. It may be your disk is not bootable, therefore its trying to boot off the network
    Hope this helps.
    M

  • Asking help for patch

    Hi,
    Could some body please help me!!
    I need patch for installing oracle under Redhat Enterprise3 and dont have an account to login to oracle metalink.
    could some body send me the patch??
    ( i need p3119415_9203_LINUX.zip and opatch Release 2.2.0 (p2617419_210_GENERIC.zip))
    I need this patch because after applying patch 3006854, I tried to install Oracle Universial Installer 2.2.0.18.0 and can be installed succesfully after that i tried to install Oracle9iR2 Patch Set 3 9.2.0.4.0 but the installation could not be finished with error say nothing to be patch.
    I ignore it and run ./runInstaller for install database but the GUI terminate without an error contain in file /oracle/OraInventory/logs
    Thanks and Regards,
    Ed

    Dong,
    there's no shortage of problems with the O9iAS installation on W_2000. It's certainly not for the faint hearted but it can be made to work in the end. I thought I had the same problem as you and I too aborted it. After dropping the schemas and restarting the configuration it happened again but completed OK when I left it alone.
    It took several hours but worked OK afterwards or at least I had a different set of problems. There was a previous entry which mentioned this in one of the discussions
    which suggested it may be a bug. Try searching for "90%".
    S.

  • Plz help on javamail api (mayagiri)

    Can you tell me that, where can i find the history of javamail api
    like,
    who developed it, what is the motivation behind it?
    why the technology was developed.
    I am student , now persuing masters in IT.
    if possible plz mail me at [email protected]

    Hi Anand,
    This forum is exclusively for discussions related to Sun Java Studio Creator.
    For information related to Javamail please visit:
    http://java.sun.com/products/javamail/
    There is also a forum for questions related to Javamail. The URL to the forum is:
    http://forum.java.sun.com/forum.jspa?forumID=43
    Cheers
    Giri :-)
    Creator Team

Maybe you are looking for

  • IPod not recognized by iTunes 5.0.1

    Hi, I recently formated my hard drive to reinstall windows xp pro. I installed my iPod and iTunes 5.0.1 and now, my iPod is recognized by windows but not by iTunes =/ I tried to uninstall then reinstall iPod drivers and iTunes but nothing changed...

  • Systems no longer exist on Report A Product Error page

    When I go to SAP Support Portal and click "Report a Product Error" I am prompted to choose the system I am submitting a request ticket for.  When I use either search feature, my system (SBOP formerly known as EPM-PLA in the SAP universe) is not avail

  • Problem in merging the partition

    I partitioned my disc to load windows into it and i did not feel comfortable with it and i have deleted the partition.since then i couldnt acess that partition.how can i merge it with other partition

  • Trouble adding a video transition

    I am trying to place a simple cross dissolve transition from a text slide I created in Final Cut Express and an imported video clip. The text slide is 3 seconds long while the video clip is 4.5 seconds long. The dissolve will only place on the video

  • HELP! I'm drowning in digital quicksands of archiving projects!

    I have been creating projects since March of this year and have completed 4 projects so far but I am continuing to keep them in the project library for this simple reason: not being able to decide how to archive them because of their huge sizes! I do