This can help you.
EmailMessage msg = new CMS.EmailEngine.EmailMessage();
EmailTemplateInfo eti = EmailTemplateProvider.GetEmailTemplate("ToApplicant", SiteContext.CurrentSiteName);
MacroResolver mcr = MacroResolver.GetInstance();
mcr.SetNamedSourceData("Name", txtApplicantFName.Text.ToString());
mcr.SetNamedSourceData("TITLE", txtPosition.Text.ToString());
msg.EmailFormat = EmailFormatEnum.Both;
msg.From = eti.TemplateFrom;
msg.Recipients = txtEmail.Text.ToString();
msg.Subject = eti.TemplateSubject;
string attachment = string.Empty;
EmailSender.SendEmailWithTemplateText(SiteContext.CurrentSiteName, msg, eti, mcr, true);