Hi @Anand R. Menon ,
If your tenant was created on or after October 22, 2019, security defaults may be enabled in your tenant.
Please refer to the following link to disable it in your tenant and see if it works:
Fix issues with printers, scanners, and LOB applications that send email using Microsoft 365 or Office 365 | Microsoft Learn
Here is a similar thread for you reference: 535 5.7.139 Authentication unsuccessful - Microsoft Q&A
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.