Skip to content
Back

Unclear about using TargetID in Messaging with serverless function

  • 0
  • Self Hosted
  • Functions
  • Messaging
  • Flutter
Rockafella
12 Apr, 2025, 21:54

I want to write a serverless function using Messaging and a Custom SMTP server to send an email to a user. Sounds simple enough, right? But I don't get it. I can use the UserId or if I have just the email address I can get the UserId with a query, but do I need another query to get the targetID (of the email) for sending a message? That seems pretty laborious. Is there another way or am I thinking about this all wrong?

TL;DR
Developers are confused about using TargetID in Messaging with a serverless function. They are unsure if they need an additional query to get the TargetID for sending an email. The process seems complicated and laborious. The solution is to directly use the email address as the TargetID for sending a message, eliminating the need for an extra query.
Rockafella
12 Apr, 2025, 21:57

Unclear about using TargetID in Messaging with serverless function

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