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
{
e.printStackTrace();
System.out.println("Exception :SorderInsertSchedule :sendMail : " + e.getMessage());
throw new ITMException(e);
}
finally
{
......@@ -2670,17 +2671,22 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
boolean debug = false;
String fromAddress = CommonConstants.MAILFROM;
System.out.println("fromAddress-------["+fromAddress+"]");
String host = CommonConstants.SMTPHOST;
System.out.println("host---------["+host+"]");
Properties props = new Properties();
Authenticator auth = 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");
auth = new SMTPAuthenticator();
}
Session session= Session.getDefaultInstance(props,auth);
session.setDebug(debug);
System.out.println("host---------["+host+"]");
try {
Message message = new MimeMessage(session);
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