Title: Error PHP Warning: require_once(sendgrid/sendgrid-php.php): failed to open stre
Last modified: September 10, 2019

---

# Error PHP Warning: require_once(sendgrid/sendgrid-php.php): failed to open stre

 *  Resolved [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/)
 * Hi,
 * I just freshly installed the post-smtp plugin, version 2.0.4. WordPress is completely
   up-to-date.
 * Set it up with a sendgrid API key, and then trying to send a testmail through
   the plugin options. That fails with an error message.
 * In the PHP error log the following message is logged:
    PHP Warning: require_once(
   sendgrid/sendgrid-php.php): failed to open stream: No such file or directory 
   in /var/www/html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanSendGridMailEngine.
   php on line 8″
 * I tried removing and reinstalling the plugin – is there any way how I can further
   troubleshoot this issue?
 * Thanks in advance,
 * Wietse
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11918623)
 * Try to upload manually with FTP.
 *  Thread Starter [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11919258)
 * That was a good pointer, thanks!
 * I figured out what the issue was – there are a bunch of .gitignore-files throughout
   the plugin-code; and that prevented my git-repo from adding the whole codebase
   to my repo.
 * I just deleted those .gitignore-files, and now life is happy.
 * Case closed!
 *  [haizelstudio](https://wordpress.org/support/users/haizelstudio/)
 * (@haizelstudio)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11938542)
 * Hey!
 * I’m currently having this same issue. I’ve looked through the plugin and cannot
   see any .gitignore files that I can remove?
 * Any idea why I would be having the same issue?
 * Cheers
 *  Thread Starter [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11939808)
 * Those files might be hidden? This were the locations I found them:
 *     ```
       ./post-smtp/Postman/Postman-Connectivity-Test/registered-domain-libs-master/.gitignore
       ./post-smtp/Postman/Postman-Mail/sendgrid/.gitignore
       ./post-smtp/Postman/Postman-Mail/sendgrid/vendor/sendgrid/sendgrid/.gitignore
       ./post-smtp/Postman/Postman-Mail/sendgrid/vendor/sendgrid/php-http-client/.gitignore
       ./post-smtp/Postman/Postman-Mail/google-api-client/vendor/google/auth/.gitignore
       ./post-smtp/Postman/Postman-Mail/google-api-client/vendor/google/apiclient-services/.gitignore
       ./post-smtp/Postman/Postman-Mail/google-api-client/vendor/psr/log/.gitignore
       ./post-smtp/Postman/Postman-Mail/mailgun/vendor/clue/stream-filter/.gitignore
       ./post-smtp/Postman/Postman-Mail/mailgun/vendor/symfony/options-resolver/.gitignore
       ./post-smtp/Postman/Postman-Mail/mailgun/vendor/webmozart/assert/.gitignore
       ```
   
 * Especially the first one is harmful, since that contains:
 *     ```
       $ cat ./post-smtp/Postman/Postman-Mail/sendgrid/.gitignore
       test/coverage/*
       examples/*
       dist/
       composer.lock
       vendor
       .env*
       sendgrid-php.php
       ```
   
 * The last entry is a reference to the sendgrid-php.php file itself, which then
   became missing in my git checkin of my wordpress installation.
 * Hope this helps!
 * Cheers,
    Wietse
    -  This reply was modified 6 years, 8 months ago by [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/).
 *  [cdsg](https://wordpress.org/support/users/cdsg/)
 * (@cdsg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11946248)
 * This .gitignore was problematic for us as well, we are using git repository to
   manage plugins code for our sites – this gitignore file results in broken sendgrid
   integration because files are not added to repository.
 *  [haizelstudio](https://wordpress.org/support/users/haizelstudio/)
 * (@haizelstudio)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11955777)
 * I don’t understand why the plugin creator would leave these problematic .gitignore
   files in the plugin folder..
 *  Thread Starter [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11955804)
 * Maybe [@yehudah](https://wordpress.org/support/users/yehudah/) can elaborate 
   on that?
 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11955877)
 * Hi guys.
 * A big part of Post SMTP is coming from 3rd party libraries so the gitignore files
   come from them.
 * I still didn’t understand if you install manually or from the dashboard how it’s
   disturbing your workflow.
 *  Thread Starter [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11956889)
 * To install + run my wordpress environment, I use the following tools:
 * – I have a git repo with all the wordpress php-files on it
    – I manage wordpress
   in that repo with the [wp-cli](https://wp-cli.org/) tool, i.e. `wp plugin install
   post-smtp` – This downloads the .zip-file, and extracts it into the plugins directory–
   I add all the newly added code to my git repo `git add .` – I commit and push
   this to github – A container build is started to build a docker image with the
   wordpress-install in it – This is deployed to Google Cloud
 * Normally, that all runs well. But if there are any .gitignore-files within the
   plugins folders, the files mentioned -in- those .gitignore-files will not be 
   added to my git-checkout, and therefore not included in the docker image.
 * If other people also use git in their wordpress-deployment workflow, they will
   encounter the same issues.
 * Would it be possible to add a `find . -type f -name .gitignore` line to your 
   release procedure to remove those .gitignore-files in future releases?
 *  [cdsg](https://wordpress.org/support/users/cdsg/)
 * (@cdsg)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11956930)
 * My workflow is pretty similar to one mentioned above by [@wmuizelaar](https://wordpress.org/support/users/wmuizelaar/),
   only difference is that instead of wp-cli I’m using [https://wpackagist.org/](https://wpackagist.org/)
   but the end result is same – missing plugin files.
 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11956958)
 * Thank you for the info.
 * I promise to take care of this from now on.
 *  Thread Starter [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * (@wmuizelaar)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11956964)
 * Great! Much appreciated!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Error PHP Warning: require_once(sendgrid/sendgrid-php.php): failed to
open stre’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [wmuizelaar](https://wordpress.org/support/users/wmuizelaar/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/error-php-warning-require_oncesendgrid-sendgrid-php-php-failed-to-open-stre/#post-11956964)
 * Status: resolved