Re: [SOLVED] PHP cannot use a provided class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux