SMTP Mail FROM Address Not Working with Amazon SES
When configuring the Mail Server settings for SMTP, there seems to be two problems that are happening.
First, it is attempting to send mail from the SMTP Username rather than the Sender Address. In most SMTP servers, this is not a problem because the SMTP username is usually the same e-mail address. However, when using Amazon SES (Simple Email Service), the SMTP username is not a valid email address, and a valid FROM address needs to be used. It seems as if the Sender Address setting in the Mail Server settings is not being used.
Relevant log snippet:
omada-controller | DEBUG: setDebug: JavaMail version 1.6.2 omada-controller | DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com sun mail smtp SMTPSSLTransport,Oracle] omada-controller | DEBUG SMTP: useEhlo true, useAuth true omada-controller | DEBUG SMTP: trying to connect to host " ", port 465, isSSL true omada-controller | 220 email-smtp ESMTP SimpleEmailService-d-3RK86H1ZJ 6oWt16JzbGN01LMUdX07 omada-controller | DEBUG SMTP: connected to host " ", port: 465 omada-controller | EHLO omadaserver omada-controller | 250-email-smtp omada-controller | 250-8BITMIME omada-controller | 250-AUTH PLAIN LOGIN omada-controller | 250 Ok omada-controller | DEBUG SMTP: Found extension "8BITMIME", arg "" omada-controller | DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN" omada-controller | DEBUG SMTP: Found extension "Ok", arg "" omada-controller | DEBUG SMTP: protocolConnect login, host= , user=AKIAXXXXXXXXXXXXW3ES, password=<non-null> omada-controller | DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 omada-controller | DEBUG SMTP: Using mechanism LOGIN omada-controller | DEBUG SMTP: AUTH LOGIN command trace suppressed omada-controller | DEBUG SMTP: AUTH LOGIN succeeded omada-controller | DEBUG SMTP: use8bit false omada-controller | MAIL FROM:<AKIAXXXXXXXXXXXXW3ES> omada-controller | 501 Invalid MAIL FROM address provided omada-controller | DEBUG SMTP: got response code 501, with response: 501 Invalid MAIL FROM address provided omada-controller | omada-controller | RSET omada-controller | 250 Ok
Second, sending a test message appears to succeed - it actually generates a "Successful" message, but the e-mail is not sent and the log shows the errors above.