Need clarification on how to correctly call wp_mail()

The standalone script will not load WordPress, so it doesn’t have a wp_mail() function. WordPress has its own built-in Ajax handlers which you can leverage and have access to all WordPress functionality within those Ajax calls.

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