},
// Call MailingGroup.get and merge results into "mailing"
_loadGroups: function (mailing) {
- return crmApi('MailingGroup', 'get', {mailing_id: mailing.id})
+ return crmApi('MailingGroup', 'get', {mailing_id: mailing.id, 'options': {'limit':0}})
.then(function (groupResult) {
mailing.recipients = {};
mailing.recipients.groups = {include: [], exclude: [], base: []};
.then(function (deliveryInfos) {
var count = Object.keys(deliveryInfos).length;
if (count === 0) {
- CRM.alert(ts('Could not identify any recipients. Perhaps the group is empty?'));
+ CRM.alert(ts('Could not identify any recipients. Perhaps your test group is empty, or you tried sending to contacts that do not exist and you have no permission to add contacts.'));
}
})
;
scope.crmMailingConst = CRM.crmMailing;
scope.ts = CRM.ts(null);
scope.hs = crmUiHelp({file: 'CRM/Mailing/MailingUI'});
+ scope.checkPerm = CRM.checkPerm;
scope[directiveName] = attr[directiveName] ? scope.$parent.$eval(attr[directiveName]) : {};
$q.when(crmMetadata.getFields('Mailing'), function(fields) {
scope.mailingFields = fields;