Jump to content

Newbie needs PhPMailer help


martinphp11

Recommended Posts

This is my first time using phpmailer, and I keep getting this error Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in /home/sites/1a/8/8cf45fef31/public_html/contact.php on line 3

Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.::/usr/share/php') in /home/sites/1a/8/8cf45fef31/public_html/contact.php on line 3

 

 

I was hoping someone can help me resolve this error issue , thank you Martin.

Link to comment
Share on other sites

What are you trying to do? Or what are the installation instructions you're following?

 

The error message indicates that you're trying to include PHPMailer through an existing Composer environment, but this environment either doesn't exist or is defective. Which one is it? Or did you just copy and paste the code without actually knowing what it does? Then you should instead read the instructions on how to use the PHPMailer autoloader.

Link to comment
Share on other sites

I installed phpmailer with Composer. and created a Json file. , and a composer.lock was created in a folder I created called vendor.  I am trying to send a contact form , I created in bootstrap. I uploaded my website to  a web server company, and I get the following error on line 3 of the example provided by PhPMailer example.

Link to comment
Share on other sites

You do not create a vendor directory, nor should there be a composer.lock in it.

 

The directory is created by Composer while it resolves the dependencies and places the libraries in that directory. You obviously haven't done that step. So once again: Which instructions are you following? Because they definitely aren't the official ones.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.