Email Addresses in Magento

In Magento in adminend (Adminend > System > Configuration > Store Email Addresses) we have a section for storing various store email addresses used in sections like Orders,Sales etc

Sometime need arises to get the values of these fields in our custom script

I am writing here the script to get these values


<?php



//General Contact

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

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



//Sales Representative

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

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



//Customer Support

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

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



//Custom Email 1

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

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



//Custom Email 2

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

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



?>	 		

Hope its useful.

8 thoughts on “Email Addresses in Magento

  1. I faced a problem in email,
    A email sent to random customer with order confirmation mail.

    Eg-:

    admin email : “admin@xyz.com”
    customer email : “customer1@xyz.com”

    but with these email a email also sent to random customer : “extra-customer@xyz.com”

    Please do needful

    Thankyou in advance

    1. Please check Admin > System > Configuration > Sales Email, all the section has a feature to send a CC of the email to saved email id, you might has set the value for it

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top