Sending emails from devices and application servers has recently become challenging because many SMTP servers require you to use OAuth 2.0, but legacy devices and applications cannot use this mechanism. You can use Xeams to bridge this gap. This page discusses configuring your devices/application servers to send emails to Xeams, which will then deliver those messages through your Google Workspace account.
Consider the following scenario:
Use the following solution to route such emails:
The following diagram shows the flow.
You must complete the following tasks before proceeding:
Most devices and application servers accept values for SMTP servers when they need to send outbound emails. If your device and Xeams are running on the same network, you can use the local IP address or hostname of the machine running Xeams for the SMTP server.
If needed, you can create users in Xeams and then specify those users for SMTP Authentication. Alternatively, you can allow certain IP addresses in Xeams to relay.
You must configure the Smart Host (under Server Configuration) to route messages through Google Workspace. During configuration, you will be prompted for three parameters:
The remainder of this document talks about steps you need to take to get the values for these parameters.
The User ID above refers to any valid user in your company, with an email that is hosted on Google Workspace. Values for the remaining two configuration parameters mentioned above are obtained by creating a project in Google Cloud. The following section discusses step-by-step instructions on how to achieve this goal.
If the search returns more than one results, select Gmail API. Click ENABLE on the following page, as shown below.
You will be ready to send emails to Google's
SMTP server from Xeams' smart host once this login is complete.
Notice that the User ID in the previous steps is set to John Doe's email. This means that John Doe must be the sender of every outbound email. If Jane Doe tries to send an email through this Smart Host, Google will replace sender's address to match John.
No further action is required if you are okay with this logic. To change this behavior, you must perform two additional steps: