Commit 21c2d1d1 authored by sakale's avatar sakale

SY90SUN012-CC part has been added for sending mail


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91272 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7e7fb910
......@@ -577,10 +577,12 @@ public class DownloadCSVBatchBean implements Schedule
String retString = "";
String to = "";
String from = "";
String cc = "";
boolean debug = false;
String subject = "",text = "";
String xmlDataFilePath = "";
java.sql.PreparedStatement pstmtSeq = null;
java.sql.ResultSet rsSeq = null;
try
{
Properties props = System.getProperties();
......@@ -623,6 +625,29 @@ public class DownloadCSVBatchBean implements Schedule
msg.setRecipients(Message.RecipientType.TO, address);
// 28/04/10 Sachin---Start to check CC address is present
pstmtSeq = conn.prepareStatement( "SELECT VAR_VALUE FROM DISPARM "
+" WHERE PRD_CODE='999999' AND VAR_NAME = 'INV_MAIL_CC' " );
rsSeq = pstmtSeq.executeQuery();
if( rsSeq.next() )
{
cc = rsSeq.getString( "VAR_VALUE" );
System.out.println("cc =="+ cc);
}
rsSeq.close();
rsSeq = null;
pstmtSeq.close();
pstmtSeq = null;
if(cc != null && cc.trim().length() > 0){
InternetAddress[] ccAddress = {new InternetAddress(cc)};
msg.setRecipients(Message.RecipientType.CC, ccAddress);
}
// 28/04/10 Sachin---End to check CC address is present
msg.setSubject(subject);
msg.setFrom(new InternetAddress(from));
msg.setContent(mp);
......
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