Hello there,

I was wondering if you have any plans to upgrade this module to drupal8.

https://www.drupal.org/project/drupalmoduleupgrader is believed to help with this.

I will gladly test and provide any useful feedback promptly, as this is now for me and many others the standard transactional email system out there for smaller volumes with mandrill changing their policy.

Kind regards

Phil

Comments

kingfisher64 created an issue. See original summary.

perignon’s picture

Yes a D8 version is planned. I maintain seven other modules and planning to upgrade them all.

I got the email about Mandrill as I have an account with them as well but I don't use it anymore. I moved to Sendgrid for Transactional emails and have never looked back.

I was going to start the D8 branch this weekend in all of the modules I maintain. I need to get more D8 work done so I can eventually move all of my sites to D8.

kingfisher64’s picture

Well I'll help where i can testing and will keep my eye on this module specifically. Probably think this could be a very highly used module by the community in future for d8.

Thanks Perignon for all your hard work. :)

perignon’s picture

Assigned: Unassigned » perignon
Priority: Major » Normal
Status: Active » Needs work
Nikeev’s picture

Hello,

I've made a basic SendGrid integration module for Drupal 8. It's not direct port from 7.x version and it has no upgrade path. Module mostly based on Mandrill module code.

Current features are:

  • Send emails with attachments.
  • Support custom tags as 'metadata' array.
  • SendGrid mail template select.
  • Queue. All messages could be added to queue and send later on cron worker. Or you can also specify mail tags to send with queue and other mails will be send immedeately.

Link: https://github.com/Nikeev/drupal_sendgrid

Hope, it will be helpful.

mikey_p’s picture

I have a more straightforward port of the SendGrid module available here: https://github.com/mikeyp/sendgrid_integration. The reporting module hasn't been upgraded yet, but everything else is working. Due to the way Maillog for D8 works, this module no longer provide integration with Maillog, although it could be added back in.

perignon’s picture

What is up with Maillog?

It is only in the D7 version for testing and none of the code works if the module is not present.

perignon’s picture

Oh yeah and thanks for the code. This was exactly the solution I was hoping would appear. I just don't have any time to code for D8 yet because my sites are all D7 and cannot migrate.

kingfisher64’s picture

Would it be possible for mikey_p or Nikeev's Drupal 8 versions to be used instead so there's an official release of the module on drupal.org?

Many thanks

perignon’s picture

Planning on it. Just haven't had the time. I will see if I can squeeze a little work in today on this.

  • Perignon committed bd7133e on 8.x-1.x authored by mikey_p
    Issue #2686237 by mikey_p: Initial commit of Drupal 8 port
    
perignon’s picture

I got the code committed. Working through testing before I take a beta release.

perignon’s picture

Right now it looks like the tests are broken. The code could work, but there is no test coverage right now.

perignon’s picture

I added a dev release to the project page.

kingfisher64’s picture

In response to #13, installed and tried to send test email. Got:

Fatal error: Class 'SendGrid\Client' not found in modules/sendgrid_integration/src/Plugin/Mail/SendgridMail.php on line 135

I'll gladly test this to help :)

perignon’s picture

@kingfisher64 did you run composer update after you installed it?

kingfisher64’s picture

Edit: Have done but "run the module's init.php script on the command line" composer manager is in report so I suspect it's nothing to do with module but my installation.

kingfisher64’s picture

Can confirm that all appears to be working fine. There's no error messages and test message feature working fine.

Thumbs up!

Thanks Perignon, mikey_p, Nikeev

perignon’s picture

Awesome. Will get a release cut this week.

kingfisher64’s picture

Re-checking report log showes the following output:

Drupal\Component\Plugin\Exception\PluginException: Plugin (SendGridResendQueue) instance class "Drupal\sendgrid_integration\Plugin\QueueWorker\SengridQueue" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).

perignon’s picture

Maybe someone else can chime in. Right now I am not using Drupal 8 on any production site so I cannot test this.

kingfisher64’s picture

Should point out it's still working. Test email received fine. Just outputting the above :)

kscheirer’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Category: Feature request » Task
Priority: Normal » Major
Status: Needs work » Needs review

I've gotten the "instance class does not exist" error when I forget to add the proper namespace, I will take a look. Thanks for the D8 version so far!

mikey_p’s picture

It's a typo in the filename: SengridQueue is missing a 'd'

kscheirer’s picture

StatusFileSize
new2.29 KB

edit - bad patch!

kscheirer’s picture

StatusFileSize
new221 bytes

Patch attached, thanks mikey_p!

perignon’s picture

Thanks for the patch & fix. I just pushed it.

kscheirer’s picture

Thanks, its working well so far. @Perignon how do you feel about a release for D8?

perignon’s picture

I feel fine about a release if you guys do :-)

kscheirer’s picture

+1 for release! I plan to use this in a production environment launching soon.

matt b’s picture

I've just tried to install and use the latest 8.x dev release. I have installed, set the sendgrid api key, and go to send a test email and get the error Message Error: Class 'SendGrid\Client' not found in Drupal\sendgrid_integration\Plugin\Mail\SendGridMail->mail()

I did not seen drush running composer to install any libraries when I installed the module? http://cgit.drupalcode.org/sendgrid_integration/tree/README.md?h=8.x-1.x says "PHP dependencies for this module are loaded via Composer in Drupal 8." - how do I do that specifically? I've run 'composer update'? (Sorry, but I miss the days when you could just download a library and use it)

perignon’s picture

matt b’s picture

Thanks Perignon

That link helped, and I found this to be an even better explanation (maybe I'll try to build my next d8 using composer): https://www.lullabot.com/articles/goodbye-drush-make-hello-composer

I used the following incantations:

composer require drupal/sendgrid_integration
drush en sendgrid_integration

and it is all working perfectly now.

You could consider making the readme file a little more explicit for D8 newbies like myself.

Thanks for this great module!

perignon’s picture

I already updated the README!

paulmckibben’s picture

+1 for creating a Drupal 8 release. I just installed and configured this for a client. Worked great!

perignon’s picture

I'm working on an upgrade of the API wrapper to the SendGrid's V3 API. After that I will start looking at D8.

damienmckenna’s picture

Status: Needs review » Fixed

Good work everyone! There's a 1.0 release out, so any other changes should go into new issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.