I wanted to share with you the procedure to integrate Google Apps (Gmail) SMTP Relay for Discourse Forums... to be honest, it's not completely difficult like you might think.
Part 1: G Suite (formerly Google Apps)
First, you should be a 'paid' G Suite user. This won't work on your existing Google Apps account if you haven't paid for this. So upgrade your account and grab the paid version. This is where you can get the 'SMTP relay service' feature unfortunately.
Here are the steps:
1) Go to Google Admin.
2) Then "Apps" > "G Suite" > "Gmail"
3) Now you are in "Settings for Gmail" page, at the bottom, click on "Advanced settings".
4) Here, search for "relay" and you'll find something called "SMTP relay service". Click the "Configure" option.
That's all. You can refer this screenshot below to see the settings I used:
You need to enter your forum's IP address here. Check all the settings thrice and don't forget to save them! Your work on "G Suite" settings is over. Now, let's go to Discourse!
Part 2: Discourse
These are the settings I used:
You don't need to enter anything for SMTP username and password here, just leave them blank. That's all you need to do. Now rebuild your container! As we all know, this will take some time, so wait for it... and read "Gmail sending limits in G Suite".
Done? Now, to see whether this is properly working or not, go to your Discourse forum:
Settings > Admin > Emails | Here you can send a test email to see if it's working or not!
That's all folks! If you are facing any issues, kindly share them and I'll try my best to give suggestions!