Avoid sending mail to certain domain

Is there any setting to avoid sending mails to persons outside the company (for example on the test environments? We want to avoid sending the test mails to wrong persons or to wrong email addresses.

Like 1



You need to create a replacing view module for EmailMessagePublisherPage and EmailPageV2 and add the following replacement of the checkSenderBeforeSend method in both schemas methods:

checkSenderBeforeSend: function() {
				var recipient = this.get("Recepient");
				var copyRecipient = this.get("CopyRecepient");
				var blindCopyRecipient = this.get("BlindCopyRecepient");
				var allRecipientsList = recipient + copyRecipient + blindCopyRecipient;
				var isYahooMailboxPresent = allRecipientsList.indexOf("") != -1;
				if (isYahooMailboxPresent) {

Additionally you need to create a localizable string in both replaced modules with the YahooMailboxIsInTheRecipients code and the value you need (this will be a popup notification that there is the domain mailbox in the list of email recipients). As a result such email won't be sent (page refresh is required once these changes are applied) and end users will see the popup. 

Show all comments