Back

Parameters/Variables in Messaging Email Body

  • 0
  • Web
  • Cloud
Heeth Jain
27 May, 2024, 16:09

Referring to messaging documentation, I want to send email for order/activity confirmations from my app

Each order/activity confirmation email will be have parameters like "name", "order_id" and so on and will be unique for every email

Example of email:

TypeScript
Hi {{first_name}},

Your order has been confirmed

Order Details:

Id: {{order_id}}
Date: {{order_date}}
Reference: {{order_reference}}

Thank you,
ACME Company
  1. How do I setup my Message with params/variables? (I see option to create Message in dashboard, but how should I format the params/variables?
  2. How do I pass those params/variables in the SDK while sending Email?

https://appwrite.io/docs/products/messaging/send-email-messages

TL;DR
Developers are looking to insert parameters like "name", "order_id" in email body. Solution: 1. To set up messages with parameters, format them as shown in the example email. 2. Pass the parameters in the SDK while sending the email according to the documentation provided at "https://appwrite.io/docs/products/messaging/send-email-messages".
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more