当我尝试从Magento中的根脚本发送电子邮件时,我得到以下错误:
Fatal error: Uncaught exception 'BadMethodCallException' with message 'Missing required argument $debugHintsPath of Magento\Developer\Model\TemplateEngine\Plugin\DebugHints.' in
/var/www/html/2x/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:45
Stack trace:
0 /var/www/html/2x/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82):
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Develop...', Array, Array)
1 /var/www/html/2x/vendor/magento/framework/ObjectManager/ObjectManager.php(71):
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Develop...')
2 /var/www/html/2x/vendor/magento/framework/Interception/PluginList/PluginList.php(234):
Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Develop...')
3 /var/www/html/2x/vendor/magento/framework/Interception/Interceptor.php(149):
Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\\Framewo...', 'debug_hints')
4 /var/www/html/2x/var/generati in /var/www/html/2x/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php
on line 45
下面是我使用的代码:
$orderid = '000000003';
$order = $obj->create('Magento\Sales\Model\Order')->loadByIncrementId($orderid);
// print_r($order->getData());
$obj->create('Magento\Sales\Model\Order\Email\Sender\OrderSender')->send($order,true);
2条答案
按热度按时间drkbr07n1#
如果需要,您还可以更改邮件的收件人:
twh00eeo2#
尝试使用