<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SmartDukaan &#x2013; /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailQueueHolder.java</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Tue, 29 Sep 2026 03:24:33 +0530</lastBuildDate><generator>WebSVN 2.8.6-DEV</generator><language>en</language><link>https://svn.smartdukaan.com/log.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-common%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fcommon%2Fmail%2FMailQueueHolder.java&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?path=%2Ftrunk%2Fprofitmandi-common%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fcommon%2Fmail%2FMailQueueHolder.java&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Mon, 31 Aug 2026 17:38:48 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37477 – mail: one way to send mail, and nothing sends inline ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;mail: one way to send mail, and nothing sends inline&lt;br /&gt;
&lt;br /&gt;
There were three overlapping APIs -- Utils.sendMail* (7 static overloads),&lt;br /&gt;
EmailServiceImpl.sendMail* (7 more) and MailOutboxService.queueMail* (20). The&lt;br /&gt;
first two built their own MimeMessage, hardcoded From: &lt;a href=&quot;mailto:noreply@smartdukaan.com&quot;&gt;noreply@smartdukaan.com&lt;/a&gt;&lt;br /&gt;
in eleven places, and pushed straight down whichever JavaMailSender the caller&lt;br /&gt;
passed.&lt;br /&gt;
&lt;br /&gt;
That From is why mail was refused: an authenticated Workspace session may send&lt;br /&gt;
only as the account it logged in as, and noreply@ is a different identity in the&lt;br /&gt;
same domain. Sending inline also meant a failed send was lost outright and took&lt;br /&gt;
the calling job down with it, which is how one expired credential came to mark&lt;br /&gt;
ten report jobs FAILED.&lt;br /&gt;
&lt;br /&gt;
New in profitmandi-common:&lt;br /&gt;
  MailQueue      - the single entry point; queue() returns once the mail is&lt;br /&gt;
                   recorded, not once it is sent&lt;br /&gt;
  MailRequest    - one value object replacing the 34 overloads&lt;br /&gt;
  MailSenderType - GOOGLE (authenticated, From rewritten) or RELAY (IP-authorised)&lt;br /&gt;
&lt;br /&gt;
The interface lives in common while MailOutboxService implements it in dao,&lt;br /&gt;
because dao depends on common and not the reverse -- Utils and EmailService&lt;br /&gt;
could not otherwise reach the outbox at all.&lt;br /&gt;
&lt;br /&gt;
Utils and EmailService keep their signatures so the ~38 call sites still&lt;br /&gt;
compile, but now delegate and ignore the JavaMailSender argument; choosing a&lt;br /&gt;
transport was never the caller&apos;s business. Both are marked deprecated.&lt;br /&gt;
MailQueueHolder bridges the static helpers to the bean and is documented as a&lt;br /&gt;
compromise, not a pattern.&lt;/div&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail&lt;br /&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailQueue.java&lt;br /&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailQueueHolder.java&lt;br /&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailRequest.java&lt;br /&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/mail/MailSenderType.java&lt;br /&gt;~ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/EmailService.java&lt;br /&gt;~ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/EmailServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/Utils.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-common%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fcommon%2Fmail%2FMailQueueHolder.java&amp;rev=37477</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-common%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fcommon%2Fmail%2FMailQueueHolder.java&amp;rev=37477</guid></item>
</channel></rss>