Home › Forums › Back End › Optimising and consolidating multiple PHPMailer functions › Reply To: Optimising and consolidating multiple PHPMailer functions
April 7, 2014 at 3:13 am
#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