Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Optimising and consolidating multiple PHPMailer functions Reply To: Optimising and consolidating multiple PHPMailer functions

#167780
Josh Johnson
Participant

@traq Cool thanks!

Yeah the $mail variable just refers to a new object called in my initialisation file. I have heard quite a few people claiming global variables are bad – what is the problem with them – too open access?

Edit: After removing the global variable and creating a new object instead, I get a “Fatal error: Class not found”??

Also, as I plan to be sending about 10 different user emails, would you recommend having a class just for emails? At the moment it is just in a General class