public function getEmail($observer){
$order= $observer->getEvent()->getOrder();
if($order->getCustomerId()){
$email = $order->getCustomerEmail(); //logged in customer
}
else{
$email = $order->getBillingAddress()->getEmail(); //not logged in customer
}
//your other logic
//lets test if it is grabbing email
Mage::log($order->getId(). " - ". $email, null, 'your_name.log');
}
This will create a file named your_name.log in var/log folder when anyone places order.
If everything is ok, then you will see your customer's email in that file.
Best Answer
In your custom-method.js file
After that just call that function you will get guest email address If you want register customer email address then use following: