Srithar Rajendran
Srithar Rajendran

Reputation: 330

SendGrid Email SDK - Java

I am using SendGrid SDK for sending the email. But below I am facing the issue of sending the dynamic values.

In the Sendgrid Java 4.0.1 version, I can use the dynamic template but can't send the dynamic value like {{name}}.

    <dependency>
        <groupId>com.sendgrid</groupId>
        <artifactId>sendgrid-java</artifactId>
        <version>4.0.1</version>
    </dependency>

I tried the Sendgrid Java 4.7.1 version, but I can't import the package com.sendgrid.helpers. It's throwing an error, cannot find symbol [ERROR] symbol: class Mail [ERROR] location: package com.sendgrid

    <dependency>
        <groupId>com.sendgrid</groupId>
        <artifactId>sendgrid-java</artifactId>
        <version>4.7.1</version>
    </dependency>

What is the correct Sendgrid SDK version to implement the dynamic template and dynamic values in Java?

Upvotes: 0

Views: 388

Answers (1)

vanshikamalhotra
vanshikamalhotra

Reputation: 69

you can use sendgrid version : 4.6.4

implementation group: 'com.sendgrid', name: 'sendgrid-java', version: '4.6.4'

While trying dynamic values , set your personalisations by addDynamicTemplateData.

Upvotes: 0

Related Questions