You could try the IP address for webmail1.com or simply "webmail1.com" for your SMTP setting in PHP.ini. Mine is currently set to my server's name and it also works when it is set to my internal IP address. Obviously, your situation is slightly different since you are using an external SMTP host.
As I mentioned before, I eventually determined that my problem was actually due to the header parameter in the mail() function. Try using the mail() function without headers:
mail($email, $subject, $message, "");
If it sends without specifying headers then you have found your problem. You may have to also of course experiment with different settings for SMTP in the ini file until you get it. As soon as I tried to send without headers it worked and I stopped getting the "Failed to connect" error. Then I just had to figure out the correct language for the header parameter.
Here is an example of my code:
$THeaders="From: My Company <info@company.com>\r\nTo: $name <$email>\r\nReply-To: My Company <info@company.com>\r\nContent-Type: text/plain";
mail($email, $TSubject, $TMessage, $THeaders);
Notice the "\r\n" used in the header setting instead of just "\n". I'm not sure but I think I read this is necessary for Windows based usage. Maybe this can help you. Let me know if you have any luck.
Brian