I am using the NodeJS SDK, but when I send the email, the name is not what I send in the from.name field.
const sendEmail = async (senderGrantId, senderName, recipientEmail, emailSubject, emailBody, sendAt) => {
try {
const sentMessage = await nylas.messages.send({
identifier: senderGrantId,
requestBody: {
from: [{ name: senderName }],
to: [{ email: recipientEmail }],
subject: emailSubject,
body: emailBody,
sendAt: sendAt
}
});
return sentMessage;
} catch (error) {
console.error("Error sending email:", error);
throw error;
}
};
@Nylanauts Can someone please advice. Thank you!