I am trying to get my emails out using GSuit (Google Apps). If using the Gmail SMTP server with user authentication, email works fine, but all emails will be sent from the user account authenticating with Google.
When using the preferred way, sending mails through the GSuit SMTP Relay server (smtp-relay.gmail.com) without user authentication, then I am getting this error in the logs:
422 Unprocessable Entity
Full log excerpt:
Started GET “/admin/email.json?=1498667751835" for 188.8.131.52 at 2017-06-28 17:14:50 +0000
Processing by Admin::EmailController#index as JSON
Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.0ms)
Started POST “/admin/email/test” for 184.108.40.206 at 2017-06-28 17:14:52 +0000
Processing by Admin::EmailController#test as /
Sent mail to email@example.com (13.4ms)
Completed 422 Unprocessable Entity in 381ms (Views: 0.2ms | ActiveRecord: 3.1ms)
Discourse at this point says that the email couldn’t be sent and I should check my mail host.
I am pretty sure the GSuit part is configured correctly (fixed IP set, set to no authentication, set to allow any from: address).
This error doesn’t really make sense to me. I found another thread that reported the same error, but that was never fixed because the guy switched to a different mail provider.