public async Task <IHttpActionResult> SendMailToAll() { var user = _userServcice.Get(2); string modelXml = ""; XmlSerializator.XmlSerialize(user, ref modelXml); QRCoderGenerator.GenerateSave(user.Guid.ToString(), $"{user.ExternalClientId}${user.BirthDate}"); var xslt = Convert.ToString(Lips.Tool.Properties.Resources.ActivateNewUser); if (MailSend.SendMail(modelXml, xslt, ConfigurationManager.AppSettings["mail"], $"Activate User - {user.Name}")) { return(Ok()); } return(BadRequest()); }
private bool getNewQrClient(long userid) { var user = _userServcice.GetUserDetail(userid); string modelXml = ""; XmlSerializator.XmlSerialize(user, ref modelXml); QRCoderGenerator.GenerateSave(user.Guid.ToString(), $"{user.ExternalClientId}${user.BirthDate}"); string xslt = Convert.ToString(Lips.Tool.Properties.Resources.NewQRCodeLipsClient); if (MailSend.SendMail(modelXml, xslt, user.Email, $"Aanvraag QR code door {user.Name}, {user.Institution.Address}")) { xslt = Convert.ToString(Lips.Tool.Properties.Resources.NewQRCodeLips); if (MailSend.SendMail(modelXml, xslt, ConfigurationManager.AppSettings["mail"], $"Aanvraag QR code door {user.Name}, {user.Institution.Address}")) { return(true); } } return(false); }