Here is what the email section looks like
newCustomerSource salesRepID = new newCustomerSource();
User salesRep = DSC.User.GetUser(salesRepID.getSalesRepIDInt(DSCUser.UserName));
NameValueCollection tokens = CoreHelper.GetSiteTokens();
tokens.Add("UserName",DSCUser.UserName);
tokens.Add("UserEmail", DSCUser.Email);
tokens.Add("UserFirstName", DSCUser.Address.FirstName);
tokens.Add("UserLastName", DSCUser.Address.LastName);
tokens.Add("UserAddress1", DSCUser.Address.Address1);
tokens.Add("UserAddress2", DSCUser.Address.Address2);
tokens.Add("UserCity", DSCUser.Address.City);
tokens.Add("UserState", DSCUser.Address.State);
tokens.Add("UserZip", DSCUser.Address.Zipcode);
tokens.Add("UserPhone", DSCUser.Address.Phone);
tokens.Add("SalesRepFirstName", salesRep.Address.FirstName);
tokens.Add("SalesRepLastName", salesRep.Address.LastName);
tokens.Add("SalesRepEmail", salesRep.Email);
EmailManager.Send("AccountApproval", tokens, tokens["Store.SiteEmailAddress"], new string[] { DSCUser.Email });
Now how do i use these tokens in the template?
%User.UserName%, %User.SalesRepEmail%???
|