Hendra,
if you use gmail you on port 587 you need to turn on TLS (successor of SSL - SSL is nowadays turned off *everywhere* as its not secure anymore);
If you want to use office 365 then use following settings:
domain/ server: smtp.office365.com
port: 587
turn on TLS!
Best