1
Personal I need a help from you, I have a form on my system, I need when I register it send an email to a user.
When I click save I enter this post to save the data.
[HttpPost]
public void EventosAdversos(EventosAdversos obj)
{
var hospitalId = int.Parse(Cookies.GetCookie("hid"));
var usuarioId = int.Parse(Cookies.GetCookie("uid"));
obj.HospitalId = hospitalId;
obj.StatPree = 1;
obj.UsuarioId = usuarioId;
if (obj.EaId == 0)
{
var eaId = _eventosAdversosService.NovoEaId(obj.PatientId, hospitalId);
obj.EaId = eaId;
}
_eventosAdversosService.Add(obj);
}
Could someone help me?
Creates an Emailservice class and encapsulates the methods you want to use for sending. At the end of your routine you would call, if successful, "Emailservice.mailEmailCadastro();". Shipping details you can find (here)[https://answall.com/questions/630/comorusposso-enviar-um-e-mail-pelo-gmail] and (here)[https://answall.com/questions/84239/enviare-mail-usando-asp-net-mvc]
– Andre Mesquita
http://netcoders.com.br/aplicando-solid-com-c-srp/
– Marco Souza