but it's POINT 2 in the question I am not able to set.
How could I add the variable 13 ( E-mail: " . $_POST['field_13'] . ") to the delivery target?
ex: mail("mymail@myadd.net, ???, secondadministrator@myadd.net","Official request","Form data:
Thanks in advance to everyone
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings!
I would like to have my form to be sent to 3 different addresses:
1) the main delivery mailbox
2) a copy to the submitter
3) a second administrator, as CC
my code is like this one (excerpt):
<snip>
mail("mymail@myadd.net","Official request","Form data:
Nome: " . $_POST['field_1'] . "
Cognome: " . $_POST['field_2'] . "
Data di nascita: " . $_POST['field_3'] . "
Sesso: " . $_POST['field_4'] . "
Indirizzo: " . $_POST['field_5'] . "
Indirizzo (continua): " . $_POST['field_6'] . "
Città: " . $_POST['field_7'] . "
CAP: " . $_POST['field_8'] . "
Provincia: " . $_POST['field_9'] . "
Nazione: " . $_POST['field_10'] . "
Tipo licenza richiesta: " . $_POST['field_12'] . "
E-mail: " . $_POST['field_13'] . "
Password di accesso: " . $_POST['field_15'] . "
Pagamento tramite : " . $_POST['field_19'] . "
<snip>
Now, I know that I can add an email add with a comma within the first variable field
ex: mail("mymail@myadd.net, secondadministrator@myadd.net","Official request","Form data:
but it's POINT 2 in the question I am not able to set.
How could I add the variable 13 ( E-mail: " . $_POST['field_13'] . ") to the delivery target?
ex: mail("mymail@myadd.net, ???, secondadministrator@myadd.net","Official request","Form data:
Thanks in advance to everyone
Wait!
I think I solved it.
I publish it here so maybe it will be of some help for people curious about it.
mail("mymail@myadd.net, " . $_POST['field_13'] . ", secondadministrator@myadd.net","Official request","Form data:
Ciao!! :D
Last edit: PierLuigi Franchi 2015-06-09
(Yeah I know, I thought it was something more complicated and - as we say in italy - "mi sono fasciato la testa prima di prendere il colpo"*)