Magento - using the backend store configuration for custom work

If you need to use the backend settings for Magento for example the General Email, here is how you do it. This is helpful so you do not have to adjust your custom code, its all managed through the admin section of Magento.

//General Contact

$name = Mage::getStoreConfig('trans_email/ident_general/name'); //sender name

$email = Mage::getStoreConfig('trans_email/ident_general/email'); //sender email

//Sales Representative

$name = Mage::getStoreConfig('trans_email/ident_sales/name'); //sender name

$email = Mage::getStoreConfig('trans_email/ident_sales/email'); //sender email

//Customer Support

$name = Mage::getStoreConfig('trans_email/ident_support/name'); //sender name

$email = Mage::getStoreConfig('trans_email/ident_support/email'); //sender email

//Custom Email 1

$name = Mage::getStoreConfig('trans_email/ident_custom1/name'); //sender name

$email = Mage::getStoreConfig('trans_email/ident_custom1/email'); //sender email

//Custom Email 2

$name = Mage::getStoreConfig('trans_email/ident_custom2/name'); //sender name

$email = Mage::getStoreConfig('trans_email/ident_custom2/email'); //sender email