> SMTPMailer smtpMailer = new SMTPMailer(); > public string SMTPServer = ConfigurationSettings.AppSettings["SMTPServer"]; > public string SMTPUser = ConfigurationSettings.AppSettings["SMTPUser"]; > public string SMTPNotifyAddress = ConfigurationSettings.AppSettings["SMTPNotifyAddress"]; > public string SMTPPassword = ConfigurationSettings.AppSettings["SMTPPassword"]; > protected void ButtonSend_Click(object sender, EventArgs e) > { > string mailbody = "Email from :" + TextBoxFirstName.Text.TrimEnd() + " " + TextBoxLastName.Text.TrimEnd() + Environment.NewLine; > > mailbody += "Company: " + TextBoxCompany.Text.TrimEnd() + Environment.NewLine; > mailbody += "State: " + DropDownListStates.SelectedValue + Environment.NewLine; > LabelMailStatus.Text = smtpMailer.SendMailMessasge(SMTPNotifyAddress, TextBoxEmail.Text.TrimEnd(), "Test Send Subject", SMTPServer, > SMTPUser,SMTPPassword,"", mailbody); > > } >