Jump to content

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
https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/
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.

  • Like 1

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.