EDIT:
the "dirty hack" solution:
At the billing.phtml
the order is not yet placed, the customer can step back and quit shopping. It is not the good point to insert the logic.
Instead, use the checkout/success.phtml
template for the hack. You can do the following there:
<?php
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
Mage::log($order->getCustomerEmail());
Mage::log($order->getCustomerFirstname());
Mage::log($order->getCustomerLastname());
foreach ($order->getAllVisibleItems() as $item) {
Mage::log($item->getSku());
};
?>
And that's it, you have all the data to implement the custom logic.
The RECOMMENDED solution starts here:
As i understand, you will have to send the name or SKU of ordered products an the customer's email to an external client. Magento has an event-driven architecture, so in issues like this it is much better to create an Observer to catch an event. (link to "how to create Observer") The event in your case is "sales_order_place_after". For this you need in your module's config eg. app/code/local/YOUR/MODULE/etc/config.xml:
<events>
<sales_order_place_after>
<observers>
<any_unique_name_of_your_observer>
<type>singleton</type>
<class>yourclass/observer</class>
<method>sendOrderInfo</method>
</any_unique_name_of_your_observer>
</observers>
</sales_order_place_after>
</events>
And in you Observer, which is app/code/local/YOUR/MODULE/Model/Observer.php:
class YOUR_MODULE_Model_Observer extends Mage_Core_Model_Observer
{
public function sendOrderInfo($observer)
{
#get the order
$order = $observer->getEvent()->getOrder();
Mage::log($order->getBillingAddress());
Mage::log($order->getShippingAddress())
Mage::log($order->getCustomerEmail());
Mage::log($order->getCustomerFirstname());
Mage::log($order->getCustomerLastname());
foreach ($order->getAllVisibleItems() as $item) {
$sku = $item->getSku();
...
This is an example how you can retrieve the data you need, and then you can implement your custom logic inside the method of the Observer.
EDIT: a more detailed example to get the sku
of ordered items