Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:47:33+00:00 2026-06-18T08:47:33+00:00

At the top of my index.php file I have: require(‘sendgrid-php/SendGrid_loader.php’); And at the bottom

  • 0

At the top of my index.php file I have:

require('sendgrid-php/SendGrid_loader.php');

And at the bottom I use this code to send the email:

    <?php
       if(isset($_POST['submit']))
          {


          $sendgrid = new SendGrid('app11445063@heroku.com', 'password');

         $mail = new SendGrid\Mail();
          $mail->
             addTo('email@gmail.com')->
             setFrom('app11445063@heroku.com')->
             setSubject('Subject goes here')->
             setText('Hello World!')->
             setHtml('<strong>Hello World!</strong>');

          $sendgrid->
            smtp->
             send($mail);
    }
 ?>

I can’t get the code to send an email out. I have the proper account from SendGrid and Heroku. The required files are in my directory. Do I have the wrong path to the required file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:47:34+00:00Added an answer on June 18, 2026 at 8:47 am

    The issue was that the SendGrid library was not in the repository in Heroku. Just do a “git status” and add the directory to the commit and then push the directory to Heroku. Make sure you also have the correct path in the “include” in your PHP code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this bit of code at the beginning of my index.php file: if
At the top of my file I have PHP Code: if (!ISSET ($_POST['submit'])) which
I have index.php file where on the very top I define __autoload magic function.
I have an index.php file in the top level with other files such as
I'm developing web page which has main file index.php as follows: include('UserClass.php'); include('html/top.php'); $user
I have the following code: <body> <div id=container style=position:absolute; left:0px; top:0px; z-index:1;> <div id=div1
Hi I have included this in my index.php include $page; but it is not
I have this ajax_update script that updates file.php every 60 seconds.. Now file.php outputs
I have this ajax_update script that updates file.php every 60 seconds.. Now file.php outputs
I have an index.php-file, which will echo the string with the returned .html-file prepared

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.