I\'m going to use the phpmailer class in my WordPress-plugin to support the use of SMTP in my e-mail function. Is it safe to store the password in the PHP code? I don\'t fee
Tons of sites store passwords inside PHP source code. If a password is stored inside tags, it can be considered secure.
PHP source code is rendered by the PHP engine before being exposed, which is a necessary security component. There is no known way to read it, unless your site itself has security vulnerabilities.
Sources:
Possible to view PHP code of a website?
http://www.webmasterworld.com/forum88/10926.html
Read source code with PHP
http://www.vodahost.com/vodatalk/mysql-php/15061-php-source-code-php-files.html