That’s what I thought, otherwise the options wouldn’t be available. However, how can I send a copy of the request to the user if he has activated the checkbox?
I have set the option “to” in config.php. Will this be overwritten if I use the “to” option?
'to' => [
'jane@doe.com', // is already present in config.php, I would leave this line empty
'mark@otto.com'
],
I don’t understand what you want to achieve. You are asking how you can send a copy of the request to the user. The answer to this is use the cc option.
// That's how it should work?
$email['to'] = [
['abc@tld.de', 'FullName'], // Does this line have to be submitted as well? Or is the additional recipient sufficient to use the first recipient from config.php?
[esc($data['email']), esc($data['name'])]
];
Okay then, maybe my wording was wrong. The request should always be sent to a specified recipient that is stored in config.php. If the user wants to have a “copy” for himself, he can activate a checkbox for this. So that the user receives the same e-mail but without seeing another e-mail address.