Hi,
We are running Sun Java(tm) System Messaging Server 6.3-0.15 (built Feb 9 2007).
with this java code if i change email.setFrom(SenderEmial); to any other email address than the mail server will send email form that email instead of authenticated which is a problem for us so that any one can misuse it. i need help regarding this issue.I think its due to lack of SSL security so i want to know that how i can enable SSL.
| Email email = new SimpleEmail(); |
| email.setSmtpPort(25); |
| email.setAuthenticator(new DefaultAuthenticator("myemail@sunjavamail.com","myPass")); |
| email.setDebug(false); |
| email.setHostName("mail.sunjavamail.com"); |
| email.setFrom(SenderEmial); //By changing this my mail server is sending emails from any email address. |
| email.setSubject("Hi"); |
| email.setMsg("Test Mail"); |
| email.addTo("tomail@email.com"); |
| // email.setTLS(true); |
| // email.setSSL(true); |
| email.send(); |
| System.out.println("Done"); |
Thanks..