Results 1 to 3 of 3
  1. #1
    ahmtcn is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default On javax.mail Authentication Method Problem

    Hello,
    I've done mail sender on java but i want to go the normal password.
    For example,at thunderbird smtp settings i want to apply the authentication method on java.
    My application need normal password for authentication method.

  2. #2
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Location
    Delhi
    Posts
    135
    Blog Entries
    1
    Rep Power
    0

    Smile

    Please elaborate your problem.

    Posting the code would be better even.

  3. #3
    ahmtcn is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default

    My code;
    public class SendMail {

    private static final String SMTP_HOST_NAME = "smtp.gmail.com";
    private static final int SMTP_HOST_PORT = ***;
    private static final String SMTP_AUTH_USER = "***";
    private static final String SMTP_AUTH_PWD = "***";



    public void test(String adress,String subject,String messsage) throws Exception{
    Properties props = new Properties();

    props.put("mail.transport.protocol", "smtps");
    props.put("mail.smtps.host", SMTP_HOST_NAME);
    props.put("mail.smtps.auth", "true");

    Session mailSession = Session.getDefaultInstance(props);
    mailSession.setDebug(true);
    Transport transport = mailSession.getTransport();

    MimeMessage message = new MimeMessage(mailSession);
    message.setSubject(subject);
    message.setContent(messsage, "text/plain");

    message.addRecipient(Message.RecipientType.TO,
    new InternetAddress(adress));

    transport.connect
    (SMTP_HOST_NAME, SMTP_HOST_PORT, SMTP_AUTH_USER, SMTP_AUTH_PWD);

    transport.sendMessage(message,
    message.getRecipients(Message.RecipientType.TO));
    transport.close();
    }


    I want to send normal password at this code.
    But password(SMTP_AUTH_PWD) going encrypted password.
    Can i send normal password like thunderbird setting.

Similar Threads

  1. javax.mail
    By sashaxiv in forum Advanced Java
    Replies: 2
    Last Post: 06-08-2011, 12:37 PM
  2. problem with sending mail usin javaX.mail api
    By sandeepsai39 in forum New To Java
    Replies: 4
    Last Post: 11-25-2009, 06:37 AM
  3. javax.mail.Transport
    By sharpi03 in forum Advanced Java
    Replies: 5
    Last Post: 10-23-2009, 06:26 PM
  4. Replies: 2
    Last Post: 05-05-2008, 07:01 AM
  5. java mail 530 authentication required --help
    By ravinder.kadiyan in forum Java Servlet
    Replies: 1
    Last Post: 04-30-2008, 11:08 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
  •