... |
... |
@@ -166,7 +166,7 @@ class ShopwareExportNewsletterJob extends AbstractController
|
166 |
166 |
];
|
167 |
167 |
}
|
168 |
168 |
|
169 |
|
- $filename = $srcDir . '/recipients_' . date("Ymd", $intStart) . '_' . date("Ymd", $intEnd) . '.csv';
|
|
169 |
+ $filename = $srcDir . '/' . (!empty($email) && Validator::isEmail($email) ? substr(md5(uniqid()), 0, 10) . '_' : '') . 'recipients_' . date("Ymd", $intStart) . '_' . date("Ymd", $intEnd) . '.csv';
|
170 |
170 |
\file_put_contents($filename, $this->serializer->encode($arrCSV, 'csv', $this->csvContext));
|
171 |
171 |
|
172 |
172 |
// If email is provided, send the CSV file
|