Get email address of type Administrator

You can use this function to get email of all the Administrator on a WordPress website

function get_administrator_email(){
    $blogusers = get_users('role=Administrator');
    //print_r($blogusers);
    foreach ($blogusers as $user) {
        echo $user->user_email;
      }  
    }

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