Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have installed sengrid integration module add api key in secret key in sendgrid settings page. After this I tried to send test mail at admin/config/services/sendgrid/test After clicking send test message button it throws some error which I attached in screenshot and not sending mail. Kindly help me.
http://www.awesomescreenshot.com/image/1118426/5f811f0867f69f32ce8e25b57...
And accessing sendgrid reports page displays errors page with this message
The website encountered an unexpected error. Please try again later.
Comment | File | Size | Author |
---|---|---|---|
#2 | d7.local admin config services sendgrid test.png | 162.2 KB | user77 |
Comments
Comment #2
user77 CreditAttribution: user77 commentedComment #3
Perignon CreditAttribution: Perignon commentedI just ran into this last night. I am troubleshooting it right now.
Did you install the API library with Composer Manager?
Comment #4
Perignon CreditAttribution: Perignon commentedComment #6
Perignon CreditAttribution: Perignon commentedSo the first thing I found is the official Sendgrid library is creeping into the composer dependencies unless you use
--no-dev
in the composer manager update. I just updated the README installation instructions for that. I had to blow away my composer files and rebuild to correct that.I found some other minor bugs I am working through now. Give me 24 to 48 hours and I should have this fixed.
Comment #7
Perignon CreditAttribution: Perignon commentedComment #8
Perignon CreditAttribution: Perignon commentedComment #9
user77 CreditAttribution: user77 commentedRegarding #3 I have installed composer manager and enabled sendgrid_integration. I have installed sendgrid dependencies using composer update command.
After installing sendgrid and dependencies site is not opening, when checked watchdog I found this error too.
PHP Fatal error: Class 'DrupalWebTestCase' not found in /home/linux/Public/drupal7/sites/all/modules/contrib/sendgrid_integration/tests/sendgrid_integration.test on line 12
Comment #11
Perignon CreditAttribution: Perignon commentedDrupalWebTestCase
is part of the simpletest/testing module in core. It shouldn't be loading that unless you are running tests.Comment #12
Perignon CreditAttribution: Perignon commented@user77 Can you check your sites/all/libraries/composer and tell me what it downloaded. Just a list of the folders is all I need.
You should have a folder called "fastglass" and in it should be another folder called "sendgrid"
You should not have this in that folder "sendgrid/sendgrid". You should have "sendgrid/smtpapi"
Comment #13
Perignon CreditAttribution: Perignon commentedI got the correct dependencies loaded in testing: https://travis-ci.org/taz77/drupal-sendgrid_integration/jobs/119170600
Comment #14
user77 CreditAttribution: user77 commented@perignon I dont have any folder called composer inside sites/all/libraries
Comment #15
user77 CreditAttribution: user77 commentedComment #16
Perignon CreditAttribution: Perignon commented@user77 Let me see where else composer manager puts stuff. I was able to get the test email to send. I am checking other things out. My biggest problem locally was for some reason composer was loading the official library of the Sendgrid API instead of my forked version (I may rename the library).
Comment #17
Perignon CreditAttribution: Perignon commentedDo you have a sites/all/vendor?
If not, search your code base for the fine 'SendGrid.php" this will tell you where composer is putting the files.
Comment #18
user77 CreditAttribution: user77 commentedYes I have sites/all/vendor. SendGrid.php is under /sites/all/vendor/fastglass/sendgrid/lib/SendGrid.php
Comment #19
Perignon CreditAttribution: Perignon commentedOk so you got the correct library. I am getting the same error you are getting with the missing class when I install the latest code. So I am trying to determine why it's attempting to load the test files.
If I have to, I will remove the test code for now in the reports module. I have not started writing any of the actual tests yet. Just created empty test files.
Comment #20
Perignon CreditAttribution: Perignon commentedOk I found this problem. It's with Mailsystem and not the module. There is a bug in Mailsystem that is loading the test files. This is fixed in the latest dev of Mailsystem (2.x and 3.) but not in the current "released" version of Mailsystem which is very old.
Here is another module that had the same problem over a year ago #2306373: Fatal error: Class 'DrupalWebTestCase' not found in ...sites/all/modules/protected_node/tests/protected_node.test on line 11
For now, I am just going to remove the tests till I can have time to write tests.
Comment #21
user77 CreditAttribution: user77 commented@perignon Thanks. I can send test mails. If you don't mine can you tell me how to use sendgrid substitution tags in emails
Comment #23
Perignon CreditAttribution: Perignon commentedComment #24
Perignon CreditAttribution: Perignon commentedOk, I have pushed a fix to the problem. I will package another beta release now since Beta1 is essentially broken because of this.
Comment #25
Perignon CreditAttribution: Perignon commentedRelease will be live soon: https://www.drupal.org/node/2696093
Comment #26
user77 CreditAttribution: user77 commentedOkay. I have asked add substitution token. Can you tell me because I cannot find any resources regarding this.
Comment #27
Perignon CreditAttribution: Perignon commentedI am not sure what you are referring to?
Comment #28
Perignon CreditAttribution: Perignon commented