Re: [SOLVED] PHP cannot use a provided class
| From: | James Moe | Date: | Wed, 21 Mar 2018 18:29:55 +0000 |
| Subject: | Re: [SOLVED] PHP cannot use a provided class | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326402@lists.php.net to get a copy of this message | ||
On 03/21/2018 02:54 AM, Christoph M. Becker wrote:
>> Fatal error: Class 'PHPMailer\PHPMailer' not found in
>> /home/sohne/web/php/common/php-test-email.php on line 44
> Sorry, forget that. Actually, the class PHPMailer is contained in the
> PHPMailer\PHPMailer namespace, so you need the triple
>
> $mail = new \PHPMailer\PHPMailer\PHPMailer;
>
Bingo! Yes, that allowed the script to run.
Thank you.
--
James Moe
jmm-list at sohnen-moe dot com
Think.