Subversion Repositories SmartDukaan

Rev

Rev 37479 | Rev 37493 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37479 Rev 37480
Line 212... Line 212...
212
     *
212
     *
213
     * Verified working 2026-08-31: MAIL FROM:<noreply@smartdukaan.com> returns 250
213
     * Verified working 2026-08-31: MAIL FROM:<noreply@smartdukaan.com> returns 250
214
     * over IPv4. It does not authenticate -- Workspace authorises it by allowlisted
214
     * over IPv4. It does not authenticate -- Workspace authorises it by allowlisted
215
     * source IP -- so it may legitimately send as noreply@.
215
     * source IP -- so it may legitimately send as noreply@.
216
     *
216
     *
217
     * googleMailSender is NOT the default: its app password is currently rejected
217
     * googleMailSender is the alternative and its credentials are valid -- verified
218
     * with "535 5.7.8 Username and Password not accepted". Point the default back at
218
     * 2026-08-31, AUTH OK on both 465 and 587. Use it by qualifier where a message
219
     * it once a valid app password is issued for sdtech@smartdukaan.com.
219
     * must come from the authenticated identity rather than noreply@.
220
     *
220
     *
221
     * The allowlist covers the IPv4 address only. Over IPv6 the same command is
221
     * SMTP on this host works over IPv4 only, and that is not specific to the relay:
222
     * refused with "550 5.7.1 Invalid credentials for relay", so anything that
222
     * over IPv6 the relay answers "550 5.7.1 Invalid credentials for relay" and
-
 
223
     * smtp.gmail.com rejects a valid app password with "535 5.7.8 Username and
-
 
224
     * Password not accepted". The JVM prefers IPv4, which is the only reason mail
223
     * prefers IPv6 will fail here.
225
     * leaves this box at all. Anything that prefers IPv6 will fail on both paths.
224
     */
226
     */
225
    @Bean(name = {"gmailRelaySender", "mailSender"})
227
    @Bean(name = {"gmailRelaySender", "mailSender"})
226
    @Primary
228
    @Primary
227
    public JavaMailSender getGmailRelaySender() {
229
    public JavaMailSender getGmailRelaySender() {
228
        JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
230
        JavaMailSenderImpl mailSender = new JavaMailSenderImpl();