Я только что созданный метод для отправки почты подтверждения, когда новый пользовательДобавить изображение и уменьшить ссылку активации подтверждения электронной почты в идентичности Сети САШ
это контроллер
if (result.Succeeded)
{
var provider = new Microsoft.Owin.Security.DataProtection.DpapiDataProtectionProvider("AFFEMS2-HEC");
UserManager.UserTokenProvider = new Microsoft.AspNet.Identity.Owin.DataProtectorTokenProvider<ApplicationUser>(provider.Create("EmailConfirmation"));
var currentUser = UserManager.FindByName(user.UserName);
var roleresult = UserManager.AddToRole(currentUser.Id, model.RoleName);
System.Net.Mail.MailMessage m = new System.Net.Mail.MailMessage(
new System.Net.Mail.MailAddress("[email protected]", "Registration System "),
new System.Net.Mail.MailAddress(user.Email));
m.Subject = "Account Activation";
m.Body = string.Format("Dear {0},<BR/><BR/>Your account has been successfully created with the Higher Education Council. Please click on the link below to access your account. : <a href=\"{1}\" title=\"User Email Confirm\">{1}</a>", user.UserName, Url.Action("ConfirmEmail", "Account", new { Token = user.Id, Email = user.Email }, Request.Url.Scheme));
m.IsBodyHtml = true;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("##.##.##.###");
smtp.Port = ##;
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "#######");
smtp.EnableSsl = false;
smtp.Send(m);
this.SetNotification("The User has been successfully registered. A confirmation Email has been sent to: " + user.Email, NotificationEnumeration.Success);
return RedirectToAction("View_Users", "Account");
}
Теперь я хочу
1. Изображение автоответчика для тела электронной почты (над телом электронной почты)
2.Защить ссылку активации (не отправляя крупную ссылку, она должна содержать небольшие piec e текста) этого сообщения подтверждения.
Как я могу достичь этих вещей?