Woo-Commerce Send mail by code. [closed]

After doing some research on google and woocommerce code i found the ans of the what i what.

i have use following function for to send the mail to the user once order have been generated using the custom code in wordpress woo-commerce.

WC()->mailer()->emails['WC_Email_Customer_Processing_Order']->trigger($orderId);

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