After I have enabled and configured a third party payment module the mail that send tracking infos and order infos stopped working (I don't know if it was working before). I've found some code online but it didn't work.
I'm not able to download this plugin: Magento 2 Order Confirmation Email Extension by MageComp so I can't try it
If you think you are not sure if email were triggering before you you can disable that payment module and try with another payment method for order purchase.
You can check logs if any error is there, the logs are here :
Make sure you have SMTP or any any other mail server provider setup.
Hope it helps !
I've tried with the "bank transfer" payment and the email doesn't work. In the log there are no errors regarding the email.
[2020-09-23 14:30:16] main.CRITICAL: Class Plazathemes\Recentproductslider\Block\Products does not exist   [2020-09-23 14:30:16] main.CRITICAL: Invalid block type: Plazathemes\Recentproductslider\Block\Products  
also with this:
use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $obj = $bootstrap->getObjectManager(); $state = $obj->get('Magento\Framework\App\State'); $state->setAreaCode('frontend'); $objectManager = Magento\Framework\App\ObjectManager::getInstance(); $transportBuilder = $objectManager->create("Magento\Framework\Mail\Template\TransportBuilder"); $transport = $transportBuilder->setTemplateIdentifier($templateId) ->setTemplateOptions(['area' => Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId]) ->setTemplateVars($templateParams) ->setFrom(array('email' => 'firstname.lastname@example.org', 'name' => 'SenderName')) ->addTo($receiverMail, "RecaiverName") ->setReplyTo('email@example.com'); $transport = $transport->getTransport();
it works and I actually recieve the mail.
The default mail() method returns true but the mail doesn't arrive in my inbox
are you getting other emails apart from these two emails of tracking no. and order confirmation ?
if Yes, can you please change your mail templates to default for once from admin :
Store > Configuration > Sales > Sales Email
if it works then it's issue with your email templates.
Hope it works with default email !
That's my configuration (see screenshot above), I don't receive anything. And also with the code that i sent you before i receive this email: