PHP Build a Basic PHP Website (2018) Adding a Basic Form Using A Third-Party Library

Zijun Liao
Zijun Liao
13,409 Points

PHPMailer configuration

We are not using autoload.php and use PHPMailer.php and Exception.php instead. Can any tell me how I can find this information in the documentation, in case I need to add any other open source project in the future?

I notice that I need to use following statements in ,but not sure why Alena only use part of them,

use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception;

require 'path/to/PHPMailer/src/Exception.php'; require 'path/to/PHPMailer/src/PHPMailer.php'; require 'path/to/PHPMailer/src/SMTP.php';

Dave StSomeWhere
Dave StSomeWhere
19,802 Points

You need to go though the instructions in the just like you did with that like you posted. Alena did the course on a prior version so at the time the course was created all was fine and those individual modules that Alena used were all that was needed at that time. Now they are bundled differently (as you found out) - so, no need to be concerned with the exact steps Alena needed to do at the time.

Just part of the game, things are always changing/upgrading and you need to go through the documentation, like you did - well done.