Gmail hosted with Java

Discussion in 'Java' started by chtogdepochem@gmail.com, Aug 13, 2006.

  1. Guest

    Hi All,

    I switched to gmail hosted service.
    Previously I had my account at gmail for example

    My program would send emails using the code:

    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    boolean debug = true;

    Poperties props = new Properties();
    props.put("mail.smtp.host", "smtp.gmail.com");
    props.put("mail.smtp.auth", "true");
    props.put("mail.debug", "true");
    props.put("mail.smtp.port", "465");
    props.put("mail.smtp.socketFactory.port", "465");
    props.put("mail.smtp.socketFactory.class",
    "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");

    Session session = Session.getDefaultInstance(props, new
    javax.mail.Authenticator()
    {
    protected PasswordAuthentication
    getPasswordAuthentication()
    {
    return new PasswordAuthentication("login", "pwd");
    }
    }

    now I have I still use gmail. In this case how the
    above configuration is going to look like?

    Thanks!
    , Aug 13, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    4
    Views:
    4,815
    steve
    Jul 1, 2003
  2. Matt Theule

    Windows Control hosted in WebForm

    Matt Theule, Oct 31, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    444
    Matt Theule
    Oct 31, 2003
  3. lewi
    Replies:
    0
    Views:
    331
  4. James X. Li
    Replies:
    1
    Views:
    386
    Jerry Boone
    Jan 2, 2004
  5. Jhovarie

    java GMAIL smtp with attach

    Jhovarie, Jan 13, 2011, in forum: Java
    Replies:
    0
    Views:
    497
    Jhovarie
    Jan 13, 2011
Loading...

Share This Page