All uploaded files using wp_mail() renamed to tmp_name

I was able to resolve the issue by redirecting the wp_mail() attachment to…

$attachment = $upload['file'];

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