Пример #1
0
        private void SendMails(RSVP rsvp)
        {
            try
            {
                MailServices mailSvc = new MailServices();

                string mailGuest = mailSvc.PrepareRSVPMailToGuest(rsvp);
                string mailAdmin = mailSvc.PrepareRSVPMailToAdmins(rsvp);

                mailSvc.SendMail("Il tuo RSVP", mailGuest, new List <string>()
                {
                    rsvp.Email
                });
                mailSvc.SendMail("Nuovo RSVP", mailAdmin, new List <string>()
                {
                    "*****@*****.**"
                });
            }
            catch (Exception exc)
            {
                exc.WriteToLog();
            }
        }