private string RegText(string code, EmailQueueTo emailqueueto)
{
var match = regTextRe.Match(code);
if (!match.Success)
return code;
var field = match.Groups["field"].Value;
var type = match.Groups["type"].Value;
var answer = (from qa in db.ViewOnlineRegQAs
where qa.Question == field
where qa.Type == type
where qa.PeopleId == emailqueueto.PeopleId
where qa.OrganizationId == emailqueueto.OrgId
select qa.Answer).SingleOrDefault();
return answer;
}