Gsuite will not support less secure apps from October 31
Gsuite has announced that less secure apps would not be supported from October 31.
As such it is required to integrate with Gmail API instead od using smtp authentication.
https://gsuiteupdates.googleblog.com/2019/07/limit-access-LSA.html