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.
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
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
thank you!!
very thanks!
Thanks for this information
Hey thank you very much, just what I was looking for!!!
Very helpful, thank you!