I'm trying to get the email address in the email sent from Sales > Orders > Send Email.
I use this code and it works as long as the customer in making an order:
<?php $websiteId = Mage::app()->getWebsite()->getId(); $email = Mage::getSingleton('checkout/session')->getQuote()->getCustomerEmail(); $encoded = base64_encode($email); ?>
But when I send the email from Admin in Sales > Orders > Send Email the above code fails to work.
How can I get something that will work basically everywhere?