[英]SendGrid Email SDK - Java
I am using SendGrid SDK for sending the email.我正在使用 SendGrid SDK 发送 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}}
.在 Sendgrid Java 4.0.1 版本中,我可以使用动态模板但不能发送像
{{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
.我尝试了 Sendgrid Java 4.7.1 版本,但我无法导入 package
com.sendgrid.helpers
。 It's throwing an error, cannot find symbol [ERROR] symbol: class Mail [ERROR] location: package com.sendgrid它抛出错误,找不到符号 [ERROR] 符号:class 邮件 [ERROR] 位置: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?什么是正确的Sendgrid SDK版本来实现Java中的动态模板和动态值?
you can use sendgrid version: 4.6.4您可以使用 sendgrid 版本: 4.6.4
implementation group: 'com.sendgrid', name: 'sendgrid-java', version: '4.6.4'
While trying dynamic values, set your personalisations by addDynamicTemplateData.在尝试动态值时,通过 addDynamicTemplateData 设置您的个性化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.