:EMAIL = (:$.DBG = 1 ? 'noamn@testing.com' : :EMAIL);
The value of :EMAIL prior to this expression was sigall@somecompany.co.il - the length of this string is 24 characters, whereas the length of noamn@testing.com is 17 characters. Regardless of the value of :$.DBG, the resulting string would have a length of 17 characters, and so if :$.DBG = 0, there would be an attempt to send an email to the non-existing address sigall@somecompan; of course, this would fail.
As always, it took me quite some time to find out why the email address in the letter was being truncated but took only a minute to fix. If my address is assigned to a variable prior to evaluation, then the resulting value will have the correct length.
:EMAIL = 'sigall@somecompany.co.il'; :NOAM = 'noamn@testing.com'; :EMAIL = (:$.DBG = 1 ? :NOAM : :EMAIL);
If :$.DBG = 0 then :EMAIL = 'sigall@somecompany.co.il'. If :$.DBG = 1 then :EMAIL = 'noamn@testing.com'.
No comments:
Post a Comment