I had trouble with this back then. I used a home-baked email sender, emails looked good in mail tester and several mail clients, and yet, some of my test gmail addresses got the email in the Inbox, and some of them in Spam. I have no idea what was different.