public static void SendReisliDoubleDoubleRegistrationStsMail(string to, TournamentRegistrationReisliRequest request) { var subject = ReadSubject("RegisterDoubleDouble.html"); var body = ReadBody("RegisterDoubleDouble.html"); body = body.Replace("%PLAYER1_NAME%", request.Player1.Name); body = body.Replace("%PLAYER1_ABO%", request.Player1.Abo); body = body.Replace("%PLAYER1_MAIL%", request.Player1.Mail); body = body.Replace("%PLAYER2_NAME%", request.Player2.Name); body = body.Replace("%PLAYER2_ABO%", request.Player2.Abo); body = body.Replace("%PLAYER2_MAIL%", request.Player2.Mail); body = body.Replace("%PLAYER3_NAME%", request.Player3.Name); body = body.Replace("%PLAYER3_ABO%", request.Player3.Abo); body = body.Replace("%PLAYER3_MAIL%", request.Player3.Mail); body = body.Replace("%PLAYER4_NAME%", request.Player4.Name); body = body.Replace("%PLAYER4_ABO%", request.Player4.Abo); body = body.Replace("%PLAYER4_MAIL%", request.Player4.Mail); body = body.Replace("%TOTAL%", request.Total + ""); body = body.Replace("%COMMENT%", request.Comment); body = body.Replace("%TEAMNAME%", request.TeamName); SmtpClientWrapper.Send(to, subject, body, "*****@*****.**"); }
public void Post(TournamentRegistrationReisliRequest request) { if (request.Tournament == "1") { MailSender.SendReisliDoubleDoubleRegistrationStsMail(request.Player1.Mail, request); MailSender.SendReisliDoubleDoubleRegistrationStsMail("*****@*****.**", request); } else { MailSender.SendReisliHeroesRegistrationStsMail(request.Player1.Mail, request); MailSender.SendReisliHeroesRegistrationStsMail("*****@*****.**", request); } }