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
- URGENT: Auth Data GONE and replaced by "...
This issue appeared suddenly and without warning yesterday. My auth page is replaced by the 404 error, and I don't have access to any users. When users try to l...
- when does request limit reset
it syas i need to update my plan but i dont want to do that yet, but i need to continue developing 🙂
- verification email
How do i send a verification email to a new user when they sign up without creating a session. I'm trying to use ssr. And I keep getting different answers where...
