| 37477 |
59 d 3 h |
amit |
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/ |
mail: one way to send mail, and nothing sends inline
There were three overlapping APIs -- Utils.sendMail* (7 static overloads),
EmailServiceImpl.sendMail* (7 more) and MailOutboxService.queueMail* (20). The
first two built their own MimeMessage, hardcoded From: noreply@smartdukaan.com
in eleven places, and pushed straight down whichever JavaMailSender the caller
passed.
That From is why mail was refused: an authenticated Workspace session may send
only as the account it logged in as, and noreply@ is a different identity in the
same domain. Sending inline also meant a failed send was lost outright and took
the calling job down with it, which is how one expired credential came to mark
ten report jobs FAILED.
New in profitmandi-common:
MailQueue - the single entry point; queue() returns once the mail is
recorded, not once it is sent
MailRequest - one value object replacing the 34 overloads
MailSenderType - GOOGLE (authenticated, From rewritten) or RELAY (IP-authorised)
The interface lives in common while MailOutboxService implements it in dao,
because dao depends on common and not the reverse -- Utils and EmailService
could not otherwise reach the outbox at all.
Utils and EmailService keep their signatures so the ~38 call sites still
compile, but now delegate and ignore the JavaMailSender argument; choosing a
transport was never the caller's business. Both are marked deprecated.
MailQueueHolder bridges the static helpers to the bean and is documented as a
compromise, not a pattern. |
|
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailQueue.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailQueueHolder.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailRequest.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailSenderType.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/EmailService.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/EmailServiceImpl.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/Utils.java
|
| 35995 |
230 d 1 h |
aman |
/trunk/ |
Fix:Redesign the Po Approval page, and po creation logic for first po, trail mails formatting fix |
|
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/LineItemModel.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ProfitMandiConstants.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/SalesThoughtConstants.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/TransactionApprovalModel.java /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/EmailServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/TransactionApproval.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/TrialServiceImpl.java /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/BulkOrderService.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/DashboardController.java /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/MonitorController.java /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/transaction/transaction-approvals.vm /trunk/profitmandi-fofo/src/main/webapp/resources/js/transaction-approval.js
|