SendCloud to configure an email template

When using SendCloud to configure an email template, you can include dynamic placeholders in your email content. These placeholders will be replaced with actual values when the email is sent.


Steps to Configure a SendCloud Email Template

1. Create or Edit a Template
  1. Log in to the SendCloud console.
  2. Navigate to Email Templates in the dashboard.
  3. Create a new template or edit an existing one.

2. Define Placeholders for Dynamic Data

In your email template, use SendCloud placeholders (in the format {{placeholder}}) for the dynamic values you want to include. For example:

<div style="width: 80%; max-width: 50em; margin: 4em auto; padding: 3em 2em; border-radius: .5em; background-color: #fff; box-shadow: 0 .5em 4em rgba(0,0,0,.1); line-height: 1.5;"> <div style="font-size: 1.2em; font-weight: bold;">尊敬的客户,您好!</div> <p>您的企业{{companyName}}已创建成功,您可以使用</p> <ul> <li>邮箱:<span>{{mail}}</span></li> <li>密码:<span>{{code}}</span></li> </ul> <p>登录 <a href="https://XXX?mail={{mail}}&code={{code}}">XXX</a> 查看详情。</p> </div>


3. Save and Publish the Template
  1. Save the template.
  2. Test the template by sending a sample email to verify that placeholders are replaced correctly.

4. Use the Template in API Calls

When sending an email using the SendCloud API, include the placeholders' values in the request payload.

Example Request Payload

{ "apiUser": "your_api_user", "apiKey": "your_api_key", "from": "your_email@example.com", "to": "recipient_email@example.com", "templateInvokeName": "your_template_name", "substitutionVars": { "to": ["recipient_email@example.com"], "sub": { "%companyName%": ["Your Company Name"], "%mail%": ["recipient@example.com"], "%code%": ["123456"] } } }


Key Notes

  1. Template Placeholder Syntax: Use {{placeholder}} in your template, but when sending via API, map {{placeholder}} to corresponding keys in the substitutionVars field.
  2. Testing: Always test your template before sending bulk emails to ensure placeholders are replaced correctly.
  3. Dynamic URLs: The placeholders in URLs (e.g., {{mail}}, {{code}}) will be substituted with actual values provided in the API call.

By following these steps, you can successfully configure and send dynamic emails using SendCloud. Let me know if you need further assistance!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值