I can show you how to log the SMTP debug information. I can't imagine what the cause would be, but the scripts seem correct, so it might be an issue with the email server, or spam filters preventing delivery.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.