Sending email from inside a plugin using PHP PEAR

You should take a look at wp_mail on the codex. This will do everything you need, and it’s “the wordpress way”. There are also particular controls for attachments.

Basic usage is:
<?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?>

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