added comprehensive error handling, logging to a file, and a failure notification function 2. **Moved credentials to environment variables** — the SMTP password and any API keys now live in the server's system environment, not in the code 3. **Tested the pipeline manually three times** — once with t