- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
Run below commands and try :
chmod -R 777 var/ generated/
php bin/magento setup:di:compile
php bin/magento cache:flush

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
Hi @tippanna_pawar ,
Please mention exact magento version of your instance.
Can you try below commands in sequence
rm -rf generated/* var/cache/*
php bin/magento s:d:c
php bin/magento c:f
Chmod 777 -R var/* generated/*
Thanks!
Problem Solved! Click Kudos & Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
i have all above commands but still not solving
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically


Fatal error: Uncaught Error: Cannot instantiate interface Magento\Store\Model\ScopeInterface in C:\xampp\htdocs\dnourm2\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php:50 Stack trace: #0 C:\xampp\htdocs\dnourm2\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Store\\M...', Array) #1 C:\xampp\htdocs\dnourm2\app\code\MageVision\Blog27\Controller\Adminhtml\Ohgod\index.php(34): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Store\\M...') #2 C:\xampp\htdocs\dnourm2\generated\code\MageVision\Blog27\Controller\Adminhtml\Ohgod\index\Interceptor.php(24): MageVision\Blog27\Controller\Adminhtml\Ohgod\Index->execute() #3 C:\xampp\htdocs\dnourm2\vendor\magento\framework\App\Action\Action.php(107): MageVision\Blog27\Controller\Adminhtml\Ohgod\index\Interceptor->execute() #4 C:\xampp\htdocs\dnourm2\vendor\magento\module-backend\App\AbstractAction.php(235): Magento\Framework\App\Action\Action->dispatch(Object(Mag in C:\xampp\htdocs\dnourm2\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php on line 50
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
You're override $objectManager variable value in :
$store = $objectManager = $objectManager->create('Magento\Store\Model\ScopeInterface');
change it by :
$store = $objectManager->create('Magento\Store\Model\ScopeInterface');

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
i have changed . Still showing same error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
Add use Magento\Store\Model\ScopeInterface code before your class instaintaite line of code.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Get Store email addresses programmatically
Change your email variable with :

