Subversion Repositories SmartDukaan

Rev

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

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