This is my current function below:
TypeScript
export const sendEmailNotifications = async ({
content,
sendEmailUsers,
subject,
}: {
content: string;
sendEmailUsers: string[];
subject: string;
}): Promise<void> => {
try {
await messaging.createEmail(
ID.unique(),
subject,
content,
[],
sendEmailUsers,
[],
[],
['66bd072b4824aa77bd9b', '66da0993c6adb1bd868a'],
);
} catch (error) {
throw new Error('Error Sending Email');
}
};
the sendEmailUsers is an array of userID's. it was working just fine, but when i added in the 2 empty arrays after, and then the target IDs for bcc... it sends to appwrite and just gets stuck on processing.
TL;DR
Current function is causing email to get stuck on "processing" after adding empty arrays and BCC target IDs. Solution: Check the messaging.createEmail method for any issues related to the additional parameters added.Recommended threads
- execution failed
When executing an appwrite function, I'm getting a 500 error, but I don't see it in executions. This issue appeared today. Here's the appwrite function ID: 68b4...
- How to use appwrite types
I am using appwrite types --language ts ./types to generate the types yielding something like: ``` import type { Models } from 'node-appwrite'; // This file i...
- Dynamic Roles
I tried to store a row with this permissions: permissions.push( Permission.read(Role.users("verified")), Permission.write(Role.label(`c-${calend...