My "PHPMailer" folder is placed in the Vendor in the Library inside the Thinkphp framework.
The browser error is:
But when the cursor is positioned at the call point of the SendMail function, press ctrl left-click, and the function can be positioned at the function definition point.
vendor('PHPMailer/class.phpmailer');
vendor('file entry name');
Try quoting like this (the path must be written completely)
Is it tp3?
The error you reported means that the class was not instantiated.
Vendor('PHPMailer.PHPMailerAutoload');
$mail = new PHPMailer(); //Instantiation
The problem is that the sendmailer function is written in the function.php file and cannot be written in the common.php file. This way you can call it.