Hello @Mohana Reddy,
The error message is indicating that the security default setting is blocking the use of legacy authentication. As security defaults are global setting excluding one user is not possible neither it provides any customization option.
As an alternative and more secure solution, also given that basic authentication is being depreciated kindly consider using Microsoft Graph API with OAuth 2.0 for sending emails, which aligns with Microsoft’s current security best practices and long-term support strategy.
Please review the below document for more information on the implementation.
Deprecation-of-basic-authentication-exchange-online