I'm trying to pass a property into the Message parameter of the SMTP mail writer component. I have a Message property on the incoming record, and I tried setting a global (@Message) and specifying that in the parameter, but I always get a " The expression was trying to access the value of a data record property 'message' but it is undefined or could not be calculated" error. I'm probably making an obvious error, but I can't see it.
Also, can I pass an array into the Message parameter?

The Message parameter on that component is an ExpressionType parameter, which means it will take either @message or '$(message)' as the value and use the string in the global property as the body of the email. I'm not sure what you would want the behaviour to be when using an array, but if you use @message and it's an array, only the first value will be used. If you use '$(message)', the values will be concatenated with a comma. What I would do is concatenate things manually (you can do it directly in the parameter, as shown in the attached protocol). For example, to concatenate with a new line, I would do something like this:
contract("\n",@message);
@message;
Crap - I wasn't creating @message properly...
Thanks, Andrei. Your example helped. For some reason it didn't work for me until I did the contract on the array in the local property BEFORE I set the global (I don't see why that makes a difference), but it's working now.