```js import {Client, ID, Messaging} from 'node-appwrite';
export default async ({req, res, log, error}) => { if (req.method !== 'GET') return res.json({message: 'Method not allowed'}, 405);
const client = new Client()
.setEndpoint(process.env.APPWRITE_FUNCTION_API_ENDPOINT)
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(req.headers['x-appwrite-key']);
const messaging = new Messaging(client);
await messaging.createEmail({
topics: ['69781a8c0003xxxxxx'],
subject: 'Test',
content: '<h1>Test</h1>',
html: true,
messageId: ID.unique(),
});
return res.empty();
};
The execution gets an error: ```Execution timed out.``` but the email is sent correctly??
Im very much confused as to why the return res.empty() would fail??
Even after adjusting timeout from 15s to 30s it sends the message within the first 10s and the just stays at processing status until it times out
I even tried to use a different response (res.json(...)) and still not responding
Recommended threads
- Bun Runtime
Any chance we could get Bun 1.3.8 added to the runtimes? We're currently on 1.1 and the update would be awesome
- Gitlab function automation
Im trying to automate my function deployment using gitlabs ci/cd pipeline. Im currently failing trying to use the appwrite cli to create a new deployment. ```...
- SSL for SaaS
Hi everyone 👋 I'm building a website builder SaaS using Appwrite Cloud Functions My architecture relies on users connecting their own custom domains via CNAME...