PaulHoOutsystems / email_extended

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Unexpect behavior at sendEmail #3

Closed johnesthomas closed 3 days ago

johnesthomas commented 3 days ago

Using the sendEmail action, it is only possible to sendEmail if the input parameters to, cc, bcc and replyTo are filled in. I believe that only the "to" input parameter is necessary, right?

Sending only "to" parameter, I have this following exception.

image image

PaulHoOutsystems commented 3 days ago

Hi @johnesthomas even though cc, bcc, replyTo are "optional", they should be pass in as an empty list if there is nothing for those values.

johnesthomas commented 3 days ago

Very strange then, the email is only sent successfully when all these fields are filled in.

PaulHoOutsystems commented 3 days ago

Just to enure that my understanding is correct. You are passing as empty list for "cc", "bcc" and "replyTo"?

johnesthomas commented 3 days ago

Exactly, when I fill in these items, the email is sent successfully, if I don't enter any value, the email is not sent.

PaulHoOutsystems commented 3 days ago

Is the replyTo list an empty list that you are passing over?

johnesthomas commented 3 days ago

Yes, since all these parameters require a text list, I'm just passing an empty text element home.

PaulHoOutsystems commented 3 days ago

This is indeed strange because, the unit test sendEmail_Ext_test1 is scenario that matches your case and it is showing up as pass. For sendEmail_Ext_test1, cc, bcc and replyTo are all empty list. See line 105 to 119 of the unit test case and you will notice that.

johnesthomas commented 3 days ago

Hi Paul, before I was passing an empty element within each list, that's why the error was happening. But now, I had to create a local variable of the text list type and pass it through the lists that are mandatory. I believe that the ideal would be to just remove the mandatory nature of these fields. Thanks for the support!