Well, something has been lost in translation

Email me your script directly as an attachment and I will compare to the original and see where the problem lies.

If your address file does not contain sensitive information then attach that too, and I will run it through my script and ensure that it works in all cases.