Internal curl error has occurred within the executor! Error Number: 52Error Code: 500
- 0
- Functions
- Cloud

Getting the above error in execution tab while running on appwrite cloud. I am trying to send emails from node:appwrite and nodemailer as well but both are showing the above error. functionId: 673ccc4600223a53680e

Your function is probably timing out. Maybe from incorrect mail settings

What's your code and how are you executing your function?

// const sdk = require('node-appwrite');
const nodemailer = require('nodemailer');
// Initialize the Mail Service
// const mailService = new sdk.Messaging(client);
export default async (context) => {
try {
context.log(context.req.bodyJson);
context.log(context.req.bodyJson);
const payload = context.req.bodyJson; // The data passed when triggering the function
// Retrieve email and other relevant details
const email = payload.email;
const petName = payload.petName;
const transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 587,
secure: false,
auth: {
user: process.env.emailUser,
pass: process.env.emailPassword,
},
});
const mailOptions = {
from: '',
to: email,
subject: 'subject',
html: 'html',
};
transporter.sendMail(mailOptions, (err, info) => {
if (err) {
context.error(err);
} else {
context.log('sent');
}
});
return context.res.json({ success: true, message: 'Email sent successfully.' });
} catch (err) {
context.error('Error sending email:', err);
return context.res.json({ success: false, error: err.message });
}
};

This is the approach i've used for sending mails using nodemailer, i've also tried using node:appwrite but no luck.

This seems okay. I'd have to troubleshoot this with you when I'm at a computer tomorrow.
Would you please also share your project id and deployment id?

Here's the latest deployment ID: 673ce25bf082a75070ba project id: 673857a800117f69b1e3

Hi @Steven any update on this please ?
Recommended threads
- Network Request Failed
Trying to save a file to the bucket but getting network request failed. Using react-native-image-picker.
- upsert_documents is not work with jwt cl...
client.set_jwt(jwt) databases = Databases(client) databases.upsert_documents(General, Pallets, [{"$id": "684aeb3e0021e64c10f1", "name": 'тест '}]) This code al...
- Unable to set Display Name for Collectio...
In database: Collection -> Settings. Display Name: Add attribute -> Select attribute -> After selecting attribute, the "Select attribute" text still shows. A...
