Home › Forums › Back End › Optimising and consolidating multiple PHPMailer functions › Reply To: Optimising and consolidating multiple PHPMailer functions
April 6, 2014 at 1:33 pm
#167749
__
Participant
Compose the message elsewhere, and make the function responsible only for preparing and sending the email.
Also, don’t do this!
function whatever( $arg1,$arg2 ){
global $var1;
// ...
}
do this instead:
function whatever( $arg1,$arg2,$var1 ){
// ...
}
global state is evil.