Lots of list brokers exist, but the data is not usually reliable. I have built a database 0f roughly 30,000 local agents for myself using the methods below.
As others have mentioned, the state licensing body typically has email addresses for all licensed agents in the state. Most states will also have a publicly accessible database of agents with some basic information. One potential way to get access to this data is through your states freedom of information act, if you have one.
Another source is the national association of realtors and their chapters. Of course, this only includes licensees that are members. Occasionally, they will offer "sponsorships", whereby they will email your message to their list of agents. It's also possible for members to have access to these email addresses – I recall the realtor.org website having a lookup too. There are also local boards that may have a publicly accessible/scrapable database. You'll need a tool or script to scrape this.
The third source is the local MLS, albeit a bit more segregated, but they will also have email addresses. Occasionally, MLS members will have access. The other methods mentioned above may also be viable.