public static void SendEmail(IEmailable emailEntity, string toAddress, LeagueRace leagueRace) { MailMessage email = new MailMessage(); email.From = new MailAddress("*****@*****.**"); email.To.Add(new MailAddress(toAddress)); email.Subject = emailEntity.GetSubject(leagueRace); email.Body = emailEntity.GetBody(leagueRace); #if !DEBUG SmtpClient client = new SmtpClient(); client.EnableSsl = false; client.Send(email); #endif }
public void SendMessage(IEmailable target, string subject, string body) { // Code to send email, using target's email address and name }