I used javamail api for sending mails. First I tried gmail smtp servers and everything was ok. But now I want to use my own mail servers (via cPanel). But there is something wrong with my properties. Can anyone help me?
Here is my properties code:
Properties props = new Properties();
props.put("mail.smtp.host", "cpanel4.onofis.com");
props.put("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "465");
And here is cPanel's server informations:
Username: blabllabla@blabla.com
Password: blablablabla.
Outgoing Server: cpanel4.onofis.com
SMTP: Port 465
Authentication is required for IMAP, POP3, and SMTP.