Email doesn't work with script-src CSP

Quick update. I figured out that the browser’s debug tools actually tells me which hashes to use, so I’ve used those and made some progress. However, I’m now stuck on the actual button:

<button type="button" class="btn btn-outline-primary input-group-text" onclick="smtpTest(); return false;" data-orig-value="">Send test email</button>

How do I create a hash for this? The browser isn’t telling me what to use this time. It just says “Refused to execute inline event handler because it violates the following csp …”

Any suggestions would be appreciated. Thanks!