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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...