Install mailparse extension. support heroku 18 and heroku 20 stack
Add buildpack to your Heroku app
heroku buildpacks:add https://github.com/svikramjeet/heroku-buildpack-mailparse --app <your_app>
Buildpacks are scripts that are run when your app is deployed.