0
I am trying to email the Phpmailer class but I am having trouble.
Here I get a good one:
$mail->AddAddress('[email protected]', 'Nome do Destinatário');
But when I put a variable, it won’t... return the following error: "You must provide at least one recipient email address."
$mail->AddAddress('$email', '$nome');
How can I solve this little problem? Thank you!
EDIT: SOLVED.
I did it this way:
' . $email . '
Try to figure out why the data of this variable doesn’t arrive there, put your code so we understand
– Lucas Antonio
You did not solve, because you do not understand how it works simple quotes and compound quotes, need to read about and if the variable
$email
and$nome
for a text does not need quotes ... after all are texts.– novic
Can be considered duplicate: https://answall.com/questions/4652/diff%C3%A7a-between-single-double-quote-in-php
– novic