Does wp_mail work in frontend tempate file?

My question is if it can be used be not logged in users or not.

Yes. wp_mail() works fine from the front end when not logged in. I use it for a contact page on my web site.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)