I'm trying to develop an application that sends mail. It work well, but if i send an email from Gmail to hotmail, it's considered as spam. Here is a piece of code that describes the parameters of smtp server
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", "smtp.gmail.com"); // pour hotmail -> smtp.live.com
props.put("mail.smtp.port", "587");
Session session = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(emailFrom, password);
}
});
Any idea please ? Thank you.