function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Supraja KallakuriSupraja Kallakuri 

Help with sendgrid integration

Can someone help me in integrating sendgrid into my own org? I need to send bulk email(for campaigns) to a specified list of recepients. 

I took some help from here.

But when I tried implementing it in my or, I always had a compiling error
Error Error: Compile Error: Illegal assignment from SendGrid.SendGridResponse to String

Please suggest. Thanks for your time.
Deepak Kumar ShyoranDeepak Kumar Shyoran
This is because the response you are trying to assign to the string is not of type String. Fist you need to convert it to String before assigning it to String.
Ashvin BhattAshvin Bhatt

Suprajata - This is because you're trying to get the response of send method in a string. You need to get response in proper object of sendgrid response class provided in the package.

SendGrid.SendGridResponse response = sendgrid.send(emails);

Let me know if it solves the issue.

Vikas Bhardwaj 5Vikas Bhardwaj 5
Ashvin - your solution worked for me, thanks!!
Srinivas Bandi 4Srinivas Bandi 4
Can we schedule emails with sendgrid integration?