SAP / cloud-sdk-js

Use the SAP Cloud SDK for JavaScript / TypeScript to reduce development effort when building applications on SAP Business Technology Platform that communicate with SAP solutions and services such as SAP S/4HANA Cloud, SAP SuccessFactors, and many others.
Apache License 2.0
161 stars 55 forks source link

Update replyTo type definition in mail client #4864

Closed hagendaehne closed 1 month ago

hagendaehne commented 1 month ago

Describe the bug Email sending via SAP Cloud SDK is currently being implemented and it has been discovered that the replyTo type is not sufficiently defined. It should be updated to replyTo?: string | Address | (string | Address)[] | undefined;. This update is necessary to allow the configuration of more than one replyTo address. Since the SAP Cloud SDK uses nodemailer, which supports an array for the replyTo property, the type definition needs to be adjusted to reflect this capability.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to send an email using the SAP Cloud SDK mail-client with an array of addresses for the replyTo property.
  2. Observe the TypeScript error due to incorrect type definition.

Expected behavior It should be possible to pass an array of addresses for the replyTo property of the MailConfig type to the mail-client sendMail function, aligned with the capabilities of nodemailer.

Screenshots If applicable, add screenshots to help explain your problem.

Used Versions:

Code Examples Link to code If applicable, add code snippets as examples to help explain your problem. Please remove sensitive information.

Log file If applicable, add your log file or related error message. Again, please remove your sensitive information.

Impact / Priority Priority: Low, because we have a workaround Affected development phase: Development Impact: Blocked

Additional context Add any other context about the problem here.