search
top

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 Responses to “Email Addresses in Magento”

  1. Megha says:

    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

    • Decrypt Web says:

      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

  2. WH says:

    thank you!!

  3. dungdk says:

    very thanks!

  4. salik says:

    Thanks for this information

  5. kretosh says:

    Hey thank you very much, just what I was looking for!!!

  6. J6891 says:

    Very helpful, thank you!

Leave a Reply

top