How to set email alert on successful cron import
One among them is to select a CSV file from your FTP server. You need to provide your FTP information as listed below for importing products using this method.
- Enable FTP import/export: Check this option to enable FTP import/export.
- FTP Server Host/IP: Enter your FTP server hostname.
- FTP User Name: Enter your FTP username.
- FTP Password: Enter your FTP password
- FTP Server Path: Enter the FTP server path.
- Use FTPS: Check this option to use FTPS. FTPS (File Transfer Protocol Secure) is a secure extension of FTP (File Transfer Protocol).
On setting up the cron job, the importing will occur as per the configuration. In order to receive an alert on successful auto import or export, simply insert the below-given code snippet into the function.php of the active child theme.
In the above snippet, the email subject is ‘Product Auto Import Export’ and the body of the mail is the ‘Product scheduled import completed’. You can replace your personalized email content in the snippet as per your preference.