SOLVED: Email after csv upload

dimoss

Well-Known Member
Hi,

reading another thread and using the list csv plugin I manage to have automated email send after csv import.
using the following:
PHP:
$config = JFactory::getConfig();
$to = "xxxx@xxx.com";
$subject = "Some text";
$msg = "some text!";

$res = FabrikWorker::sendMail(
   $config->get('emailfrom'),
   $config->get('fromname'),
   $to,
   $subject,
   $msg
);

However in the list csv plugin as the code run on every row multiple emails are sent.
My question is how is it possible only one to be sent per import?
Thanks.
 
The IMPORT_COMPLETE_CODE_DESC text was wrong (obviously copied from START_CODE and not changed)
 
I assume it's somewhere (I don't have an example, doesn't it show a message with x rows imported?).
Try to var_dump $listModel->data or $listModel->getData(), maybe it's there.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top