Commit 6ff2357c authored by msingh's avatar msingh

Changes in SalesReturnConf.java for DDUK


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99824 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c837cb92
...@@ -2629,6 +2629,7 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf ...@@ -2629,6 +2629,7 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
{ {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception :SorderInsertSchedule :sendMail : " + e.getMessage()); System.out.println("Exception :SorderInsertSchedule :sendMail : " + e.getMessage());
throw new ITMException(e);
} }
finally finally
{ {
...@@ -2670,17 +2671,22 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf ...@@ -2670,17 +2671,22 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
boolean debug = false; boolean debug = false;
String fromAddress = CommonConstants.MAILFROM; String fromAddress = CommonConstants.MAILFROM;
System.out.println("fromAddress-------["+fromAddress+"]");
String host = CommonConstants.SMTPHOST; String host = CommonConstants.SMTPHOST;
System.out.println("host---------["+host+"]");
Properties props = new Properties(); Properties props = new Properties();
Authenticator auth = null; Authenticator auth = null;
if(CommonConstants.USERNAME != null && CommonConstants.PASSWORD != null) if(CommonConstants.USERNAME != null && CommonConstants.PASSWORD != null)
{ {
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", host);
props.put("mail.smtp.port", "2587");
props.put("mail.smtp.auth","true"); props.put("mail.smtp.auth","true");
auth = new SMTPAuthenticator(); auth = new SMTPAuthenticator();
} }
Session session= Session.getDefaultInstance(props,auth); Session session= Session.getDefaultInstance(props,auth);
session.setDebug(debug); session.setDebug(debug);
System.out.println("host---------["+host+"]");
try { try {
Message message = new MimeMessage(session); Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(fromAddress)); message.setFrom(new InternetAddress(fromAddress));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment