0

I want to exclude recipients at two different domains from sends. Is Audience Exclusion Script the best way to accomplish this? If yes, what does that script look like?

However, the data extensions I'm sending to are being populated with queries. Is there a way to include the domain exclusion within the query so I don't have to bother with a user-initiated send using audience exclusion script? I tried using "EmailAddress NOT LIKE '@domain.com%'". The syntax of the query was valid but the records the query returned still contained those at the domain I was trying to exclude. Then I tried EmailAddress NOT CONTAINS '@domain.com%' but that syntax was invalid.

1

You could add the following WHERE-condition to your SQL-query:

WHERE EmailAddress NOT LIKE '%@domain.com'
0

You can use audience exclusion scripts - definitely, and over time, this can be an awesome feature. Please see question here for details: Managing Exclusion Scripts @ Scale?

In terms of your query, you should be able to write as follows:

select SubscriberKey, EmailAddress

from _Subscribers

where
EmailAddress NOT LIKE '%@gmail.com' AND
EmailAddress NOT LIKE '%@hotmail.com' AND
EmailAddress NOT LIKE '%@yahoo.com' AND
EmailAddress NOT LIKE '%@live.com' 
0

You can use an Exclusion Script in the Send Definition:

domain(emailaddr) == "comcast.net" or domain(emailaddr) == "aol.com"

There's also a domain exclusion data extension template that can be enabled by SFMC support, if you'd prefer to manage the domains that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.