Additional emails not being sent - PHPMailer - $ mail-addAddress ('[email protected] ')

0

Good evening.

I have a rather curious problem. I have a client where I was hired to service your old site. As the same does not want to update the site now, I'm turning in the middle of that mess.

However, something strange happened to me: imagine that inside this site I have two files that have the function of executing the email trigger. So I have, for example, the files envia_email1.php and envia_email2.php . For now, everything is quiet. The fact is that in the envia_email1.php file the emails are being sent normally to all the recipients. The envia_email2.php file only sends to the recipient it is serving as the basis for SMTP authentication. All others are ignored.

Detail: Files are IDENTICAL. It was a Ctrl + C and Ctrl + V on the hard face. All shipping logic is similar, even the names of the variables I kept.

On this basis, I did the following: I tried to instantiate an object for each email and it did not work. I changed the shipping order and it did not work. Instead of passing to the variable, I put the emails directly in the parameter in string format ( $mail->addAddress('[email protected]'); ) and also did not work.

I updated the package in PHPMailer, going from version 5.2 to going to 6. It also did not work. I made the require of the class and then I did with the composer autoload: it did not work either.

In any case, the first file works normally, but the second sends only to the email that does the SMTP authentication in PHPMailer.

I come here to ask you for help! The only information I thought I might be able to change in something was in DEBUG mode. However, I still have not found a solution to it. Here is an example of how I'm doing the shot and after debug mode image as soon as the shot is done:

// Define o remetente
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$mail->From = "[email protected]"; // Seu e-mail
$mail->Sender = "[email protected]"; // Seu e-mail
$mail->FromName = "Meu Site"; // Seu nome

// Define os destinatário(s)
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$mail->AddAddress('[email protected]');
$mail->AddAddress('[email protected]');
$mail->AddAddress('[email protected]');

Below is the DEBUG image:

Finally, I'll be grateful if any of you know what the real problem is.

Thank you in advance!

    
asked by anonymous 19.09.2017 / 08:35

0 answers