Hi @Akash J,
Are you using basic authentication in your code?
If yes, by default SMTP basic authentication is supposed to be disabled in your tenant.
To enable basic authentication, please make sure you have these settings set correctly:
Error: Authentication unsuccessful
Alternatively, if you can use Oauth instead in your code, you do not need to configure these settings to enable SMTP basic auth.
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.