| Line 10... |
Line 10... |
| 10 |
import com.spice.profitmandi.dao.model.purchaseSaleRatio.CatalogAgedModel;
|
10 |
import com.spice.profitmandi.dao.model.purchaseSaleRatio.CatalogAgedModel;
|
| 11 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
11 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 12 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
12 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| 13 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseSupplierInvoiceRepository;
|
13 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseSupplierInvoiceRepository;
|
| 14 |
import com.spice.profitmandi.service.AuthService;
|
14 |
import com.spice.profitmandi.service.AuthService;
|
| - |
|
15 |
import com.spice.profitmandi.service.mail.MailOutboxService;
|
| 15 |
import org.apache.logging.log4j.LogManager;
|
16 |
import org.apache.logging.log4j.LogManager;
|
| 16 |
import org.apache.logging.log4j.Logger;
|
17 |
import org.apache.logging.log4j.Logger;
|
| 17 |
import org.springframework.beans.factory.annotation.Autowired;
|
18 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 18 |
import org.springframework.core.io.ByteArrayResource;
|
19 |
import org.springframework.core.io.ByteArrayResource;
|
| 19 |
import org.springframework.mail.javamail.JavaMailSender;
|
20 |
import org.springframework.mail.javamail.JavaMailSender;
|
| Line 42... |
Line 43... |
| 42 |
|
43 |
|
| 43 |
@Autowired
|
44 |
@Autowired
|
| 44 |
JavaMailSender googleMailSender;
|
45 |
JavaMailSender googleMailSender;
|
| 45 |
|
46 |
|
| 46 |
@Autowired
|
47 |
@Autowired
|
| - |
|
48 |
MailOutboxService mailOutboxService;
|
| - |
|
49 |
|
| - |
|
50 |
@Autowired
|
| 47 |
AuthService authService;
|
51 |
AuthService authService;
|
| 48 |
@Autowired
|
52 |
@Autowired
|
| 49 |
AuthRepository authRepository;
|
53 |
AuthRepository authRepository;
|
| 50 |
|
54 |
|
| 51 |
@Autowired
|
55 |
@Autowired
|
| Line 172... |
Line 176... |
| 172 |
helper.setBcc(emailBcc);
|
176 |
helper.setBcc(emailBcc);
|
| 173 |
|
177 |
|
| 174 |
InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "Smart Dukaan");
|
178 |
InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "Smart Dukaan");
|
| 175 |
helper.setFrom(senderAddress);
|
179 |
helper.setFrom(senderAddress);
|
| 176 |
try {
|
180 |
try {
|
| 177 |
Utils.sendMailWithAttachments(googleMailSender, emailTo, null, emailBcc, subject, messageText, true, attachment1);
|
181 |
mailOutboxService.queueMailWithAttachmentsViaGoogle(emailTo, null, emailBcc, subject, messageText, true, "PurSaleServiceImpl.moreThen10DaysEgedStockReport", attachment1);
|
| 178 |
//Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, null, subject, messageText, true, attachment1);
|
182 |
//Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, null, subject, messageText, true, attachment1);
|
| 179 |
} catch (Exception e) {
|
183 |
} catch (Exception e) {
|
| 180 |
throw new RuntimeException(e);
|
184 |
throw new RuntimeException(e);
|
| 181 |
}
|
185 |
}
|
| 182 |
}
|
186 |
}
|