Yep, you can use substitution tags in subject lines! Read about how to use them here..
How you format your substitution tags may depend on the library you used to create your SMTP connection, the language you are writing your code in, or any intermediate mail servers that your servers will send mail through.
In some cases -subVal- may be the best choice while in others, %subVal% or #subVal# may make more sense. It is best to avoid characters that have special meaning in html, such as <,>, and &. These might end up encoded and will not be properly substituted.
Furthermore, don’t use spaces inside your substitution tags, e.g. %first name%. Consider using underscores(_) to denote spaces.
Substitution tags are different from Marketing Campaigns custom fields, and are only used in conjunction with our SMTP API when sending over SMTP or Web API.