Hi Ole Kristain,
I just setup smtp on 3.1.6 its worked fine, but what i found if there is space before or after "smtp.gmail.com" then its return host not found, please check and make sure it does not contain extra space.
Thanks and Regards
Mohit Mali