Wait are you still getting the first error, or did that fix it? I'm confused.
The second issue appears to be a problem with how the from value is encoded on the page.
To fix that, delete that line of code and open the Email Server Behavior and set it there instead. The from value really shouldn't be set to the entered value from the form because it will effect the deliver-ability. Instead set the FROM address to a valid email address on your web server that ends with the same @domain.com address that your website uses. Then set the Reply-To address to use the form element value instead.