Hi Friends,
Please help on the below.
I need to enable Personal option "Allow Microsoft Dynamics crm to send email" through C# code.
Please share the code if any one.
*This post is locked for comments
I have the same question (0)

Hi Friends,
Please help on the below.
I need to enable Personal option "Allow Microsoft Dynamics crm to send email" through C# code.
Please share the code if any one.
*This post is locked for comments
I have the same question (0)I think you just need to set
issendasallowed
to true.
But you'll need to get UserSettings record for the user, and, unless you are doing it under that user's account, you'll need to impersonate such calls (since even admins won't have access to the user settings of other users I believe)
There is an example of how you can retrieve a user settings record here:
missdynamicscrm.blogspot.ca/.../get-current-user-setting-timezone-crm-c.html
So you just need to update it after that:
userSettings["issendasallowed"] = 1;
service.Update(userSettings);
For the impersonation, you just need to pass userid when creating a service in the plugin:
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
msdn.microsoft.com/.../gg594416.aspx
Although, if you are doing it in the plugin that's running under the calling user account, you don't need to bother about impersonation