Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code error in mailing_list example #1990

Closed
cburkitt opened this issue Feb 24, 2020 · 2 comments
Closed

Code error in mailing_list example #1990

cburkitt opened this issue Feb 24, 2020 · 2 comments

Comments

@cburkitt
Copy link

Hi

In the mailing_list.php example, lines 69-71, is the following code:

//Reset the connection to abort sending this message
//The loop will continue trying to send to the rest of the list
$mail->smtp->reset();

This caused a fatal error in my script:
Cannot access protected property PHPMailer::$smtp

I looked at the PHPMailer.php code and the $smtp property is indeed protected, so I don't see how this reset can work.

The reset was only triggered because an exception was thrown when running $mail->send() but that was a server issue that is now fixed.

Have I missed something here? My PHP is not bad, but not brilliant either!

Thanks,

Charles

@Synchro
Copy link
Member

Synchro commented Feb 24, 2020

Thanks for reporting - You are absolutely correct - fixed in master!

@cburkitt
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants