Q:

How to get User email address using user_login from wp-user in wortdpress?

How to get user email from wp-user table in wordpress?
$user = get_user_by( 'login', 'admin' );
echo 'User is ' . $user->user_email.;

It's Not working.
Thanx & Regards

A:

EDIT
Since you want to retrieve a user based on username and get_user_by is not working you can try this:
global $wpdb;
$username = 'admin';
$email = $wpdb->get_var( $wpdb->prepare("
SELECT user_email 
FROM $wpdb->users 
WHERE user_login = %s
", 
$username
) );

echo "$username's email is: $email";

