Hello, I have a problem when I try sent an email with duplicate values. I read the data from the db the column name is docente1, docente,2, docente3 and the rows contain the emails saved in ch forms6 .... but when the value (email) is duplicated, the email is not sent.
Is there any way to force the send email when the field is duplicate o empty
Thanks
Is there any way to force the send email when the field is duplicate o empty
Thanks
) [result] => the Mail could not be sent. [var] => )
No, you have to remove the duplicates. It's using the Joomla mail function, which if there are duplicates simply doesn't send and returns an unhelpful "false".
You can use PHP
You can use PHP
$all_emails = $this->get('read_data_function_name.[n].model.emailfieldname');Then just use {var:php_block_name} for the email addresses.
return array_unique($all_emails);
Hi, thanks for the answer
I tried it on connectivity and it didn't work
I tried it on connectivity and it didn't work
Ahow debug please including the result of the code I gave you
The name function is read_pdf_data an the model name PDF
where conditions is
PDF.aid:{data:pdf_aid}

using the debug mode retrieve all the emails based on aid
The PHP code function

And the email function

Debug mode when send email
where conditions is
PDF.aid:{data:pdf_aid}

using the debug mode retrieve all the emails based on aid


And the email function

Debug mode when send email

Don't use the <?php tags in the PHP code block.
And since you want a whole bunch of fields you'll need to do it differently.
And since you want a whole bunch of fields you'll need to do it differently.
$keys = ['docente1', 'docente2', 'docente3', 'and all the rest of the email fields'];No <?php tags. There's probably a nicer way to do this but you get what you get.
$emails = [];
foreach($keys as $key) {
$emails += $this->get("read_pdf_data.[n].PDF.{$key}");
}
return array_unique($emails);
This topic is locked and no more replies can be posted.