I can send from Yahoo and Gmail, but no matter what I do I can't send from hotmail.
public class LiveSenderActivity extends javax.mail.Authenticator {
private String mailhost = "smtp.live.com";
private String user;
private String password;
private Session session;
static {
Security.addProvider(new com.provider.JSSEProvider());
}
public LiveSenderActivity(String user, String password) {
this.user = user;
this.password = password;
// This connects to the actual mailserver
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", mailhost);
props.put("mail.smtp.port", "587");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.socketFactory.port", "587");
props.put("mail.smtp.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
props.setProperty("mail.smtp.quitwait", "false");
session = Session.getDefaultInstance(props, this);
}
I've tried with and without the SSL stuff, and with port 25 instead of 587... Nothing.
Am I doing something wrong? Like I said, yahoo and gmail work like a charm, but not this..
Its not giving me any errors either..