Send custom email by using cron job magento2
-
26-01-2021 - |
Question
I want to send an Email through a cron job for every 24hrs once.In that email need to mention all the abandoned cart details. I am new to Cron jobs so can you please explain it. Thanks in advance
Solution
create new module Vendor_Module
create a new file crontab.xml
at this location:
app/code/Vendor/Module/etc/
and insert below code
create new file Customemail.php
at the location:
app/code/Vendor/Module/Cron/
and code as below
<?php
namespace Vendor\Module\Cron;
class Customemail
{
public function execute()
{
//send custom mail
}
}
try this solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange