You need to sign in to do that
Don't have an account?
RupaliJ
"Portal User Creation" email delivery failed if that portal user created using Apex Code
Hi,
I've trigger on Quote which create "Portal User" for its associated contact if not exist.
Code runs without any error and even Portal User also created in org, but email delivery failed i.e. email address provided while user creation not receives any mail.
Also tried following line of code with above:
But still result is same. No email delivered to created Portal User.
I also checked "Deliverability" setting under "Email Administration" and Access level is already set to "All mails".
Is there any other reason of email is not being sent?
Thanks,
Rupali
I've trigger on Quote which create "Portal User" for its associated contact if not exist.
User newPortalUser = new User(Alias = 'AK', EmailEncodingKey = 'UTF-8', LastName = 'AK', LanguageLocaleKey = 'en_US', LocaleSidKey = 'en_US', Email = myContact.Email , ProfileID = myProfile.Id, ContactId = myContact.Id, TimeZoneSidKey = 'America/Los_Angeles', Username = 'test@dev.com' ); insert newPortalUser;
Code runs without any error and even Portal User also created in org, but email delivery failed i.e. email address provided while user creation not receives any mail.
Also tried following line of code with above:
Database.DMLOptions dmo = new Database.DMLOptions(); dmo.EmailHeader.triggerUserEmail = false; newPortalUser.setOptions(dmo);
But still result is same. No email delivered to created Portal User.
I also checked "Deliverability" setting under "Email Administration" and Access level is already set to "All mails".
Is there any other reason of email is not being sent?
Thanks,
Rupali
Can you try out the below link example,
http://salesforcekings.blogspot.in/2013/11/salesforce-community-user-creation.html
let me know if still you face an issue.