/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/coveragefileupload/AddressReport.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/coveragefileupload/AddressReport.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3083 by torben, Fri Jul 29 06:26:48 2016 UTC revision 3084 by torben, Fri Jul 29 09:16:03 2016 UTC
# Line 96  public class AddressReport { Line 96  public class AddressReport {
96                  this.duplicateCount = duplicateCount;                  this.duplicateCount = duplicateCount;
97          }          }
98    
99          public void sendRapport() {          public void sendRapport(boolean failed) {
100                  logger.info("Sending mail");                  logger.info("Sending mail, failed:" + failed);
101    
102                  String reportData = getReportData();                  String reportData = getReportData();
103                    
104                  String subject = "Adresse indlæsnings rapport for " + source.getDistributor();                  String subject = "Adresse indlæsnings rapport for " + source.getDistributor();
105                                    
106                    if (failed) {
107                            subject = "Error: too many closed addresses for " + source.getDistributor();
108                            reportData = "<h1><font color='red'>Data er IKKE skrevet til DB</font></h1><br>\r\n" + reportData;
109                    }
110                    
111                  String newOpenCloseAttachment = getAttachement();                  String newOpenCloseAttachment = getAttachement();
112    
113                  MailSender.sendMailWithAttachment(subject, reportData, "Details.csv", newOpenCloseAttachment);                  MailSender.sendMailWithAttachment(subject, reportData, "Details.csv", newOpenCloseAttachment);

Legend:
Removed from v.3083  
changed lines
  Added in v.3084

  ViewVC Help
Powered by ViewVC 1.1.20