nylas / nylas-nodejs

A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
MIT License
166 stars 116 forks source link

messages/send does not support "from" field #542

Closed jaencarrodine closed 4 months ago

jaencarrodine commented 4 months ago

Describe the bug A clear and concise description of what the bug is.

The "from" user name cannot be set when sending emails.

To Reproduce Some steps involved to reproduce the bug and any code samples you can share.

// Helps us with reproducing the error :)

await nylas.messages.send({ identifier: messagingAccountRes.data.grant_id, requestBody: { to: [{ email: to }], subject: subject, body: body, //@ts-ignore from: [{ email: , name: }], }, })

Expected behavior A clear and concise description of what you expected to happen.

BaseCreateMessage should be updated to include from field, from field should be passed to the sent email

SDK Version: Providing the SDK version can help with the reproduction of the issue and to know if a change could have broken something. 7.1.0 Additional context Add any other context about the problem here.

mrashed-dev commented 4 months ago

@jaencarrodine thanks for opening this issue! We've opened a PR that should solve this, and will be available in the next release.