That's what we thought, but after working on it that way for a day we just still couldn't get it to work.
I am not an expert on CGI/Perl, so I was working with someone who was - I apologize if I don't explain very well, but here is what I got out of it:
I'm sorry I didn't write down the exact error we started with, but it might have been the
535 Incorrect authentication data
Finally after a day of struggling, we decided to try AUTH LOGIN instead of PLAIN or the other option. That didn't work at first, so we tried encoding the username & password. Suddenly, it worked.
It seemed to need to wait for a response also, so that's why the $smtp->response(); was added.
Does that even make sense???