try { string sendtoSales = ccTB.Text; string href = "http://mr.tth/MakeReadyDONE/" + newFilename + ".pdf"; MailMessage message = new MailMessage(); message.To.Add("taysseer@email.ca"); message.To.Add("mr@email.ca"); message.To.Add(ccTB.Text); message.Subject = "A new mr has been created: #" + newFilename; message.From = new MailAddress("mr@email.ca"); message.IsBodyHtml = true; if (TextBox1.Text == "") { message.Body = "Link to new MR: " + "\n<a href=\"" + href + "\">Click Here</a> <p><p> Submitted by" + createnew.BusinessMgr; } else { message.Body = "Link to new MR: " + "\n<a href=\"" + href + "\">Click Here</a> <p><p>" + createnew.BusinessMgr + " commented: " + TextBox1.Text; } SmtpClient smtp = new SmtpClient("xch1.email.ca", 25); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.UseDefaultCredentials = false; smtp.Credentials = new NetworkCredential("mr", "password", "mremail"); smtp.Send(message); } finally { Response.Redirect("sentemailRESULT.aspx"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)