mirror of
https://github.com/moparisthebest/mail
synced 2024-12-23 15:58:49 -05:00
filter empty addresses on write
This commit is contained in:
parent
8d0bc279c3
commit
25adfbf8b1
@ -215,9 +215,9 @@ define(function(require) {
|
|||||||
from: [{
|
from: [{
|
||||||
address: emailDao._account.emailAddress
|
address: emailDao._account.emailAddress
|
||||||
}],
|
}],
|
||||||
to: $scope.to,
|
to: $scope.to.filter(filterEmptyAddresses),
|
||||||
cc: $scope.cc,
|
cc: $scope.cc.filter(filterEmptyAddresses),
|
||||||
bcc: $scope.bcc,
|
bcc: $scope.bcc.filter(filterEmptyAddresses),
|
||||||
subject: $scope.subject.trim() ? $scope.subject.trim() : str.fallbackSubject, // Subject line, or the fallback subject, if nothing valid was entered
|
subject: $scope.subject.trim() ? $scope.subject.trim() : str.fallbackSubject, // Subject line, or the fallback subject, if nothing valid was entered
|
||||||
body: $scope.body.trim(), // use parsed plaintext body
|
body: $scope.body.trim(), // use parsed plaintext body
|
||||||
attachments: $scope.attachments
|
attachments: $scope.attachments
|
||||||
@ -264,6 +264,10 @@ define(function(require) {
|
|||||||
$scope.onError(err);
|
$scope.onError(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function filterEmptyAddresses(addr) {
|
||||||
|
return !!addr.address;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user