Send mail with gift card code when order is placed Magento

1) Go to  System > Configuration > Sales > Giftcard
2) Set the value Generate Gift Card Account when Order Item is”   to “Ordered” .