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
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:
Attempt to send an email using the SAP Cloud SDK mail-client with an array of addresses for the replyTo property.
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:
node version via node -v: v20.11.1
npm version via npm -v: 10.2.4
SAP Cloud SDK version you used as dependency: @sap-cloud-sdk/mail-client: 3.16.0
Code ExamplesLink 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.
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 toreplyTo?: string | Address | (string | Address)[] | undefined;
. This update is necessary to allow the configuration of more than onereplyTo
address. Since the SAP Cloud SDK uses nodemailer, which supports an array for thereplyTo
property, the type definition needs to be adjusted to reflect this capability.To Reproduce Steps to reproduce the behavior:
replyTo
property.Expected behavior It should be possible to pass an array of addresses for the
replyTo
property of theMailConfig
type to the mail-clientsendMail
function, aligned with the capabilities of nodemailer.Screenshots If applicable, add screenshots to help explain your problem.
Used Versions:
node -v
: v20.11.1npm -v
: 10.2.4Code 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.