Are there any best practices for adjusting the path to PHPMailer when moving a script to a different directory on the server?

When moving a script using PHPMailer to a different directory on the server, it's important to update the path to the PHPMailer files to ensure the script can still locate and use them properly. One common best practice is to use the `__DIR__` magic constant to dynamically reference the current directory of the script, making the path adjustment more flexible and robust.

// Update the path to PHPMailer files when moving script to a different directory
require_once __DIR__ . '/path/to/PHPMailer/PHPMailer.php';
require_once __DIR__ . '/path/to/PHPMailer/SMTP.php';
require_once __DIR__ . '/path/to/PHPMailer/Exception.php';

// Your PHPMailer code here
$mail = new PHPMailer\PHPMailer\PHPMailer();