8. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/8/2017 1:33:39 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

8.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\main\java\gov\va\med\fee\util Email.java Fri Dec 8 17:53:56 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\main\java\gov\va\med\fee\util Email.java Fri Dec 8 18:29:40 2017 UTC

8.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 172
Changed 2 6
Inserted 0 0
Removed 0 0

8.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

8.4 Active regular expressions

No regular expressions were active.

8.5 Comparison detail

  1   /*
  2    *
  3    */
  4   package go v.va.med.f ee.util;
  5  
  6   import jav a.util.Cal endar;
  7   import jav a.util.Gre gorianCale ndar;
  8   import jav a.util.Pro perties;
  9  
  10   import jav ax.mail.Me ssagingExc eption;
  11   import jav ax.mail.Se ssion;
  12   import jav ax.mail.Tr ansport;
  13   import jav ax.mail.in ternet.Add ressExcept ion;
  14   import jav ax.mail.in ternet.Int ernetAddre ss;
  15   import jav ax.mail.in ternet.Mim eMessage;
  16   import jav ax.mail.Me ssage;
  17  
  18   import org .apache.lo gging.log4 j.LogManag er;
  19   import org .apache.lo gging.log4 j.Logger;
  20  
  21   public cla ss Email {
  22  
  23           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Emai l.class);
  24  
  25           St ring recip ients[] =  { "" };
  26           St ring subje ct = "";
  27           St ring messa ge = "";
  28           St ring from  = " PII                    ";
  29  
  30           pu blic Strin g postMail (String re cipients[] , String s ubject, St ring messa ge, String  from, boo lean sendR eadNotice,
  31                             String  readNotic eAddress)  throws Mes sagingExce ption, Add ressExcept ion {
  32                    
  33                    bool ean debug  = false;
  34                    Stri ng ret = " ";
  35                    // S et the hos t smtp add ress
  36                    Prop erties pro ps = new P roperties( );
  37                     props.put( "mail.smtp .host", " DNS          ");
  38                     props.put( "mail.host ", " DNS          ");
  39  
  40                    // c reate some  propertie s and get  the defaul t Session
  41                    Sess ion sessio n = Sessio n.getInsta nce (props );
  42                    sess ion.setDeb ug(debug);
  43  
  44                    // c reate a me ssage
  45                    Mess age msg =  new MimeMe ssage(sess ion);
  46  
  47                    // s et the fro m and to a ddress
  48                    Inte rnetAddres s addressF rom = new  InternetAd dress(from );
  49                    msg. setFrom(ad dressFrom) ;
  50  
  51                    Inte rnetAddres s[] addres sTo = new  InternetAd dress[reci pients.len gth];
  52                    for  (int i = 0 ; i < reci pients.len gth; i++)  {
  53                             try {
  54                                      if (reci pients[i]  != null &&  !recipien ts[i].equa ls("")) {
  55                                               InternetAd dress addr essTemp =  new Intern etAddress( recipients [i]);
  56                                               addressTem p.validate ();
  57                                               addressTo[ i] = addre ssTemp;
  58                                               msg.setRec ipients(Me ssage.Reci pientType. TO, addres sTo);
  59  
  60                                               if (sendRe adNotice)  {
  61                                                       ms g.setHeade r("Disposi tion-Notif ication-To ", readNot iceAddress );
  62                                               }
  63  
  64                                               // Setting  the Subje ct and Con tent Type
  65                                               msg.setSub ject(subje ct);
  66                                               msg.setCon tent(messa ge, "text/ html");
  67                                               Transport. send(msg);
  68  
  69                                               GregorianC alendar gc  = new Gre gorianCale ndar();
  70                                               String dts  = (gc.get (Calendar. MONTH) + 1 ) + "/" +  gc.get(Cal endar.DAY_ OF_MONTH)  + "/"
  71                                                                + gc .get(Calen dar.YEAR)  + " at " +  gc.get(Ca lendar.HOU R_OF_DAY)  + ":"
  72                                                                + gc .get(Calen dar.MINUTE ) + ":" +  gc.get(Cal endar.SECO ND);
  73                                               ret += "me ssage sent  at " + dt s;
  74                                      }
  75                             } catc h (Address Exception  ae) {
  76                                      ret += " AddressExc eption ERR OR: " + ae .getMessag e();
  77                                      logger.e rror(ae.ge tMessage() , ae);
  78                             } catc h (Messagi ngExceptio n me) {
  79                                      ret += " MessagingE xception E rror: " +  me.getMess age();
  80                                      logger.e rror(me.ge tMessage() , me);
  81                             } catc h (Excepti on e) {
  82                                      ret += " Exception  Error: " +  e.getMess age();
  83                                      logger.e rror(e.get Message(),  e);
  84                             }
  85                    }
  86  
  87                    retu rn ret;
  88           }
  89   }