Has anyone ever come across this error when trying to use send grid just as a Single Sender not when smpt is set up with send grid? I didn’t wanna go through the worry of setting up smtp on domain as yet. I believe I might be missing something so I am calling on the community for help. Or, how did any of you manage to implement Sendgrid via middleware?
The error is that it is missing the @sendgrid/mail package, it is not a package that we use default in Server Connect. Did you add some custom code that is requiring this package? If you want to use the sendgrid npm package then you have to install it with npm i @sendgrid/mail.
Thanks for your reply @patrick. I did install the Sendgrid package and try to use the Wappler Mailer setup after and still got the same error message. But the thing is I struggle a lot when it comes to implementing middleware in Wappler I hardly know how to do it or get it right. I was trying to set up this middleware per Sendgrid as a custom module in Wappler but I know I was going to struggle a lot so this is I am reaching out to see if anyone can give a helping hand by walking me though that process of creating a custom module from it or something.
The Wappler Mailer doesn’t use the sendgrid package. What exactly are you trying to do, do you want to use the sendgrid package to write your own custom module or do you just want to use the smtp protocol?
You can’t do both, currently you custom module is probably giving the error. Remove your custom code and try it with just the Wappler mailer first. If you really need the sendgrid package and a cusom module then we can have a look on how to implement their code.
So, I haven’t wrote the any custom code or try to write my own custom module yet. I just npm the sendgrid package when first saw error message saying its missing, then I delete the Wappler Mailer I have created restarted Wappler and try to use the Wappler Mailer again and I got the same error. Now, Ideally I would like a to figure out how to implement this
…And I am not sure whats the best way to go about it, if that’s entails creating a custom module or doing it middleware which are two things I struggle to do in Wappler and always need help with.
So, you can use your single sender with the smtp relay as explained in their docs.
Really a straightforward process. You don’t need to install any sendgrid node modules or whatever.
Probably you messed something with installing these packages or trying to create custom modules - it just works the way explained above and it’s the first time i am using sendgrid.