最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wp mail - How to send a particular csv file as an email?

programmeradmin0浏览0评论

I have created a function to run a query and create a CSV file. The CSV file will be stored in a particular folder on my server. These files are distinguished by dates.

I want to schedule an event that will run every day and send me the appropriate file with the date as an email from WordPress

$today_date = date('d-m-Y');
$path = $_SERVER['DOCUMENT_ROOT'].'/wp-content/reports/daily-coupon-clicks/';
$filename = 'daily-coupon-clicks-'.$today_date.'.csv';

Couldn't figure out the set of code to do this?

发布评论

评论列表(0)

  1. 暂无评论