Sender Name is Incorrect When Sending Email

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!

Hi @alienator - to clarify, the from: requires an email with name being optional.

Are you saying the email recipient does not see senderName on the received email message? Just trying to confirm the output you are expecting.

This was resolved. I had to send both the name and email attributes in the “from” value.