Help with a script for proxy traffic

Hello folks; I'm trying to write a script to test our proxy servers to see if they're passing traffic and i need help please. I wrote this code below to implement "httpie" tool but still having issues. Can someone please take a look and let me know what's wrong with this code? The code is supposed to check all the proxy IP addresses to make sure all IPs are passing traffic and if each proxy returns 200 then the code should exit but if we have an issue, the code should then send me an email saying the specific IP address returned this specific error.
The script runs fine but if any of the Proxys not passing traffic, the script sends an email but it does not tell me which IP failed. Any idea how i make it return the IP address that didn't pass traffic??

Any help with that would be greatly appreciated?

#!/bin/bash
proxy_targets="http://10.1.1.4:3128 http://10.1.1.5:3128 http://10.1.1.6:3128"

failed_hosts=""

for i in $proxy_targets
do

if http --check-status --ignore-stdin --timeout=2.5 --proxy=http:$i HEAD www.msftncsi.com/ncsi.txt &> /dev/null; then
    echo 'OK!'
else
    case $? in
        2) echo 'Request timed out!'| mail -s "The following WSA has failed to pass traffic with the following error" moe.abdel@childrens.ha
rvard.edu  ;;
        3) echo 'Unexpected HTTP 3xx Redirection!'| mail -s "The following WSA has failed to pass traffic with the following error" katkota@newwork.com  ;;
        4) echo 'HTTP 4xx Client Error!'| mail -s "The following WSA has failed to pass traffic with the following error" katkota@newwork.com  ;;
        5) echo 'HTTP 5xx Server Error!'| mail -s "The following WSA has failed to pass traffic with the following error" katkota@newwork.com  ;;
        6) echo 'Exceeded --max-redirects=<n> redirects!'| mail -s "The following WSA has failed to pass traffic with the following error" katkota@newwork.com  ;;
        *) echo 'Other Error!'| mail -s "The following WSA has failed to pass traffic with the following error" katkota@newwork.com ;;
    esac
fi
done;

How about, for instance in error code 2, instead of

2) echo 'Request timed out!'| mail -s "The following WSA has failed to pass traffic with the following error" moe.abdel@childrens.ha

you have

2) echo "$i: Request timed out!"| mail -s "The following WSA has failed to pass traffic with the following error" moe.abdel@childrens.ha

Andrew

That worked. Thanks a lot