So I've been configuring a send e-mail node and for some reason it wouldn't send out an e-mail. The node wouldn't error out, but no e-mails were getting sent out. It was driving me crazy until on a whim I decided to remove the variable I had sitting in the subject line to make it dynamic and suddenly it works perfectly. So the e-mail only seems to get sent as long as I don't put an expression of any sort other than a literal string in that subject line. Is this a bug, or is this expected behavior? Assuming it's a bug, can we get it fixed?
Discussion posts and replies are publicly visible
I've always used expressionable subject lines. Perhaps it was something else quirky in your implementation? Can you try a simplified expression and see if it still breaks? Maybe (just for craps and grins) try wrapping the expression in "toString()" to make sure there's no funky data type conflict happening? Can you share a screenshot of your nonworking configuration here?
It didn't put in anything particularly special. Just variables/constants containing text. First I tried this:
= cons!constantname & "subject stuff" (the constant being plain text that changes from environment to environment)
Then I tried assigning the value of said constant to a pv with something like this:
= pv!constantname & "subject stuff"
finally I just assigned everything to the pv and made the expression:
None of those worked until I made the expression:
What do you see if you open the expression editor for one of those earlier expressions? Can you share a screenshot?
constant looked like that
That looks like it should work, in general. Purely for troubleshooting reasons could you try wrapping the whole expression in "tostring()" and see if it happens to work then? Is there any chance you got some sort of errors in the Tomcat logs? If you can really reproduce this issue and verify it always boils down to whether there's anything other than text listed in the expression, i'd consider it grounds for an Appian support case.
I don't have access to the tomcat logs, it seems. tostring worked though!
so =cons!TEXT_CONSTANT & " my string" doesn't work, but the exact same thing works if it's wrapped in tostring()? If you can reliably produce that, I'd consider escalating it to Appian Support.
right. I wrap that in a tostring() and it sends mails out. No tostring and nothing happens.
Ok- please take that to Appian Support then, it sounds like a real potential bug. My expectation would be that anything entered in the subject line's expression editor box that resolves to a string should be a valid email subject line, and if that's not working correctly it seems like it could cause real issues & confusion.
© 2022 Appian. All rights reserved.