Gmail hosted with Java

C

chtogdepochem

Hi All,

I switched to gmail hosted service.
Previously I had my account at gmail for example (e-mail address removed)

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 (e-mail address removed) I still use gmail. In this case how the
above configuration is going to look like?

Thanks!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top