Quote:
it didn't send mail. but it display php code on browser
It seems that your web server is not supporting PHP scripts. You have to ensure that PHP is installed on the server, configured (including SMTP relevant parts when using
PHP: mail - Manual[
^]), and that the web server is configured to execute PHP scripts.
If you have dircet access to the web server, read the documentation of the web server software about PHP support.
If you don't have access to the web server configuration, ask your hoster. If you have limited access (e.g. via an web interface), read the documentation provided by your hoster or ask him. Note that some hosters have pre-configured PHP but might restrict the execution to specific paths (again, read the documentation or ask your hoster).