Not quite sure whats generating that error but it could be possibly:
Code:
command.CommandType = CommandType.StoredProcedure;
needs to be:
Code:
command.CommandType = CommandType.Text;
Also does your email errors work? If my memory servers me correct localhost will not work for the SMTPServer, you need to use mail.yourdomain.com.
Hope that helps