Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
  1. #21
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default

    thnks for the reply can u elaborate it , i m not getting you properly sorry

    :)

  2. #22
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Here in this part,

    Java Code:
    session = Session.getDefaultInstance(props, null);
    First of all read on the API more about getDefaultInstance() and getInstance().

  3. #23
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default

    Thanks Eranga
    i changed the sending class

    Java Code:
     Session session = Session.getInstance(props, new javax.mail.Authenticator() {
    //getDefaultInstance(props, new javax.mail.Authenticator() {
    
                    protected PasswordAuthentication getPasswordAuthentication() {
                        return new PasswordAuthentication(from1, pwd1);
                    }
                });
    and things went gr8

    Thanks once again :) :)

  4. #24
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help. Java run time error
    By slimce in forum New To Java
    Replies: 7
    Last Post: 05-15-2010, 05:15 PM
  2. sending mails thru pop3 server.........
    By vrk in forum Advanced Java
    Replies: 1
    Last Post: 03-25-2009, 11:59 PM
  3. Java 1.5 compile time error
    By ank_k in forum New To Java
    Replies: 4
    Last Post: 11-13-2008, 12:12 PM
  4. Replies: 21
    Last Post: 08-01-2008, 12:13 PM
  5. Forwarding mails in message/rfc822
    By prithviraj in forum Advanced Java
    Replies: 0
    Last Post: 05-18-2008, 11:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •