如何将动态数据传递给sendgrid webapp上定义的电子邮件模板? : - | Sendgrid [英] How to pass dynamic data to email template desgined on sendgrid webapp ? :-| Sendgrid

查看:1987
本文介绍了如何将动态数据传递给sendgrid webapp上定义的电子邮件模板? : - | Sendgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将sendgrid电子邮件服务与我的示例应用程序集成在一起。
&还可以发送电子邮件给用户。



但是如何将动态数据传递给sendGrid webapp的电子邮件模板设计?
是否有任何方式将动态数据发送到sendgrid上设计的电子邮件模板?



我在sendgrid上设计了欢迎电子邮件模板。 &安培;我想通过
动态数据到这个模板,即UserName,emailId,City等。使用java
代码?
当任何用户注册我的应用程序,然后我要发送欢迎
电子邮件给该用户。通过我们的数据库的用户信息,如UserName,emailId,City
等。



该怎么办?如何做?

解决方案

而不是专注于通过电子邮件模板应用程序进行替换(这是不可能的),你应该采取请查看 SMTPAPI 。通过在消息中添加X-SMTPAPI头,您可以


  1. 控制您的SendGrid帐户的设置(即即时更改过滤器设置

  2. 发送到1000单个SMTP事务中的收件人地址( SMTPAPI To:Array

  3. 在邮件正文中执行邮件合并,如替换( SMTPAPI Sub:关联数组

最后,这是假设您通过我们的SMTP或Web API直接发送电子邮件。如果您使用我们的通讯功能,可以使用自定义标签在通讯模板中。



- Joe



SendGrid


I integrated sendgrid email service with my sample application. & also able to send email to user.

But how to pass dynamic data to Email template design on sendGrid webapp? is there any way to send dynamic data to email template designed on sendgrid?

for ex. I designed Welcome email template on sendgrid. & I want to pass dynamic data to this template i.e UserName , emailId, City etc.. using java code ? when any user registered with my application then I want to send welcome email to that user. with information of user like UserName , emailId, City etc.. through our database.

What to do ? How to do ?

解决方案

Instead of focusing on substitution via the Email Template application (which is not possible), You should take a look at the SMTPAPI. By adding a X-SMTPAPI header in your message, you can

  1. Control the settings of your SendGrid account (i.e. change filter settings on the fly)
  2. Send to up to 1000 recipient addresses in a single SMTP transaction (SMTPAPI To: Array)
  3. Perform mail-merge like substitutions in the mail body (SMTPAPI Sub: Associative Array)

Finally this is assuming you are sending email directly via our SMTP or Web API. If you are using our newsletter feature, mail-merge like substitution is possible by using Custom Tags in the newsletter template.

-- Joe

SendGrid

这篇关于如何将动态数据传递给sendgrid webapp上定义的电子邮件模板? : - | Sendgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆