// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IMailManager mailManager) { app.UseCors(builder => { builder.WithOrigins("http://*****:*****@gmail.com", ex.Error.Message, ex.Error.StackTrace); var err = JsonConvert.SerializeObject(new Error() { Stacktrace = ex.Error.StackTrace, Message = ex.Error.Message }); await context.Response.Body.WriteAsync(Encoding.ASCII.GetBytes(err), 0, err.Length).ConfigureAwait(false); } }); } ); app.UseMvc(); }
public static Task SendResetPasswordAsync(this IMailManager emailManager, string email, string callbackUrl) { return(emailManager.SendEmailAsync(email, "Reset Password", $"Please reset your password by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.")); }
public static Task SendEmailConfirmationAsync(this IMailManager emailManager, string email, string link) { return(emailManager.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(link)}'>clicking here</a>.")); }
public static Task EnviarEmailConfirmacaoAsync(this IMailManager gerenciador, string email, string url) { return(gerenciador.SendEmailAsync(email, "Confirmar email", $"Por favor confirme sua conta <a href='{HtmlEncoder.Default.Encode(url)}'>clicando aqui</a>.")); }
public static Task EnviarRedifinicaoSenhaAsync(this IMailManager gerenciador, string email, string url) { return(gerenciador.SendEmailAsync(email, "Redefinir senha", $"Por favor redefina sua senha <a href='{HtmlEncoder.Default.Encode(url)}'>clicando aqui</a>.")); }