Beispiel #1
0
        public void SendMail(ClientBid bid)
        {
            MailAddress from = new MailAddress("*****@*****.**", "Prof Orient portal");
            MailAddress to = new MailAddress("*****@*****.**");
            MailMessage m = new MailMessage(from, to);
            m.Subject = "Новая заявка";
            m.Body = bid.PhoneNumber + "=" + bid.Email+ "=" + bid.Skype+ "=" +bid.Description;
            m.IsBodyHtml = true;
            SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.yandex.ru", 25);
            smtp.EnableSsl = true;

            smtp.Credentials = new System.Net.NetworkCredential("*****@*****.**", "password");
            try
            {
                smtp.Send(m);
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
        }
Beispiel #2
0
 public void CreateClientBid(ClientBid bid)
 {
     bid.Created = DateTime.Now;
     _unitOfWork.Add<ClientBid>(bid);
 }