public ContactUsEmail(string name, string email, string phone, string address, string company, string subject, string message) { parameters = new Parameters(); parameters.AddParameter("From", email); parameters.AddParameter("Name", name); parameters.AddParameter("Phone", phone); parameters.AddParameter("To", DBNLConfigurationManager.Emails.ContactFormEmailAddress); parameters.AddParameter("Body", message); parameters.AddParameter("Subject", subject); parameters.AddParameter("Company", company); parameters.AddParameter("Address", address); template = new EmailTemplate(HttpContext.Current.Server.MapPath("~/App_Data/EmailTemplates/ContactUsTemplate.xml")); }
public void Send(Parameters para, EmailTemplate template) { try { template.Merge(para); smtpClient.Send(template.MailMessage); } catch (Exception ex) { throw ex; } }