You need to sign in to do that
Don't have an account?

Disabling email notifications to a Community User through APEX code
Hi All,
I'm trying to stop the email notifications to a community User through APEX code for the following scenarios:
1. Welcome email for a New User creation
2. Email notification on receiving a Private message.
I have used the following code to disable the Email notification:
userId.UserPreferencesDisableAllFeedsEmail = true;
Even then the emails are thrown to the user.
Please suggest some workaround for this.
I'm trying to stop the email notifications to a community User through APEX code for the following scenarios:
1. Welcome email for a New User creation
2. Email notification on receiving a Private message.
I have used the following code to disable the Email notification:
userId.UserPreferencesDisableAllFeedsEmail = true;
Even then the emails are thrown to the user.
Please suggest some workaround for this.
UserPreferencesDisableAllFeedsEmail attribute is to diable all the emails related to Chatter Feeds. You can customize the welcome email for a new user creation in the email templates.
Thanks,
Raghu
The email notifications(Welcome mail and private messages notification mail) should be stopped only for the the users who are created by APEX code. For the other users who are created by the Admin through Org, the email notifications should NOT be stopped.