I am trying to configure SMTP Relay with GMail through salesforce. I have white-listed all the email Ips and ranges called out in the salesforce help doc in Gsuite for smtp relay, and it seems to be working for SF email alerts, but not when using APEX outbound emails(Messaging.SingleEmailMessage). When I check the header of the emails sent through APEX, I am finding the SPF IP is not on Salesforce IP Address help article. One example is 13.110.14.189. The emails are still coming through but I am getting SPF SOFTFAIL, and the question mark next on the sender icon from gmail, saying it might be spam. It seems the IPs also keep changing.
Does anyone know if there are specific IP ranges I need to add to verify my domain? Do I need to set up DKIM?
Thank you for your help!