I have 2 Users that belong to the queue 'Sales' with the Send Email to Members checked.
I have an online app that creates a new lead, and sets various lead fields, but the email is not sent to members of the queue. Code:
Lead l = new Lead();
...
l.OwnerId = [Id of Sales Queue];
Database.DMLOptions dmlOpt = new Database.DMLOptions();
dmlOpt.EmailHeader.triggerUserEmail = true;
database.insert(l, dmlOpt);
I am aware that there is another option to use default assignment rules which would reassign the queue and send the email to the queue members, however I do not want assignment rules to be evaluated, I only want to send the email to the member of the queues upon insert.
Why is no email sent?