Some providers (GMAIL) will return an error when you define a From or will replace the value with the default User Principle Name / account address.
If you wish to send with a different from ensure you have the alias setup:
- With the provider - requires the mail administrator involvement
- Within your mail client - for Gmail this is in Settings > Accounts > Send mail as
Providing they have the alias setup within their provider, allowed to send as, then they can use the
from attribute in the message endpoint.
Please reach out to the mail administrator if the from field is not accepted.
Note: While Nylas supports sending using an alias, the 'Send As' feature is something that would have to be implemented within your app i.e. Allowing your end-users to choose an e-mail address different from the e-mail address of their connected account