I don't think that you have any option but to use eval
.
The following:
sms="SMSFile"
email="EmailSubj"
for x in sms email; do eval val=\$$x; echo variable \$$x=$val; done;
should result in:
variable $sms=SMSFile
variable $email=EmailSubj
in both sh
and dash
.