public EmailResult VerificationEmail(User model) { To.Add(model.EmailAddress); From = "*****@*****.**"; Subject = "Welcome to My Cool Site!"; return(Email("VerificationEmail", model)); }
public bool InsertAt(int index, NodeInput inp, bool triggerAddEvent = true) { if ((inp.Type & Type) != 0) { if (inp.Input != null) { inp.Input.Remove(inp); } inp.Input = this; if (index >= To.Count) { To.Add(inp); } else { To.Insert(index, inp); } if (triggerAddEvent) { if (OnInputAdded != null) { OnInputAdded(this); } } return(true); } return(false); }
public void AddTo(string email, string name, MandrillMailAddressType?type) { To.Add(new MandrillMailAddress(email, name) { Type = type }); }
/* * /// <summary> * /// E-Mail durch Benutzereingabe * /// </summary> * /// <param name="model"></param> * /// <returns></returns> * public EmailResult CustomTextEmail(CustomMailModel model) * { * if (!string.IsNullOrEmpty(model.SenderUser.Email)) * { * * From = new MailAddress(model.SenderUser.Email, * model.SenderUser.FirstName + " " + model.SenderUser.LastName + " (via NINE)").ToString(); * } * * if (model.ReceiverUsers.Count == 1) * { * To.Add(model.ReceiverUsers.First().Email); * } * else * { * // Mehr als einer => BCC * foreach (var receiver in model.ReceiverUsers) * { * BCC.Add(receiver.Email); * } * } * * foreach (var attachtment in model.Attachments) * { * Attachments.Add(attachtment.FileName, attachtment.Bytes); * } * * * Subject = model.Subject; * * return Email("CustomTextMail", model); * } */ /// <summary> /// Fachshcaft /// </summary> /// <param name="model"></param> /// <returns></returns> internal EmailResult RegisterUnionEMail(OrgMemberMailModel model) { To.Add(model.User.Email); Subject = $"Mitmachen bei {model.Organiser.ShortName}"; return(Email("RegisterUnionEMail", model)); }
/// <summary> /// Initializes a new instance of the <see cref="MailMessage"/> class by using the specified <see cref="T:System.String"/> class objects. /// </summary> /// <param name="from">A <see cref="T:System.String"/> that contains the address of the sender of the e-mail message.</param> /// <param name="to">A <see cref="T:System.String"/> that contains the addresses of the recipients of the e-mail message.</param> /// <exception cref="T:System.ArgumentNullException"><paramref name="from"/> is null.-or-<paramref name="to"/> is null.</exception> /// <exception cref="T:System.ArgumentException"><paramref name="from"/> is <see cref="F:System.String.Empty"/> ("").-or-<paramref name="to"/> is <see cref="F:System.String.Empty"/> ("").</exception> public MailMessage(string from, string to) : this() { if (from == null) { throw new ArgumentNullException("from"); } if (to == null) { throw new ArgumentNullException("to"); } if (from == String.Empty) { throw new ArgumentException("The parameter 'from' cannot be an empty string.", "from"); } if (to == String.Empty) { throw new ArgumentException("The parameter 'to' cannot be an empty string.", "to"); } To.Add(to); From = from; }
public async Task <bool> CreatesUserStartSessionNotificationEmail(UserChatModel userDetails, string urlHelpDeskLogin) { string ToAddress = ConfigurationManager.AppSettings["SendToAddres"]; char[] separatorArray = { ';' }; string[] segmentedList = ToAddress.Split(separatorArray); string subject = "Nuevo usuario conectado al chat de servicio al cliente del BCCR"; //gets To Address for the message to be send for (int x = 0; x <= segmentedList.Length - 2; x++) { To.Add(segmentedList[x]); } //creates the message body for this email StringBuilder messageBody = new StringBuilder(); messageBody.Append("<div><p>Un nuevo usuario ha ingresado al chat de servicio al cliente del BCCR.<br/>"); messageBody.Append("Información del usuario conectado:<br/>"); messageBody.Append(String.Format("<ul><li>Nombre: {0}</li>", userDetails._UserFullName)); messageBody.Append(String.Format("<li>Correo Electrónico: {0}</li>", userDetails._UserEmail)); messageBody.Append(String.Format("<li>Teléfono: {0}</li>", userDetails._UserPhone)); messageBody.Append(String.Format("<li>Pregunta: {0}</li></ul><br/>", userDetails._UserQuestion)); messageBody.Append("Para ponerse en contacto con este usuario, por favor ingrese a la "); messageBody.Append(String.Format(" siguiente dirección: {0}</p></div>", urlHelpDeskLogin)); foreach (string item in To) { MailAddress toAddress = new MailAddress(item); await SendEmailAsync(toAddress, subject, messageBody.ToString(), true); } return(true); }
public virtual EmailResult PaymentSuspendedEmail(User affectedUser) { Subject = "Subscription Suspended"; To.Add(affectedUser.EmailAddress); return(this.Email(viewName: "SubscriptionSuspendedEmail", model: affectedUser)); }
public Email( EmailAccount from, EmailContact to, string subject, string message, bool isHtml, string batchId, DateTime initialSendDate, bool isSigned, bool isEncrypted ) { From = from; To.Add(to); Subject = subject; Message = message; IsHtml = isHtml; BatchId = batchId; SendDate = initialSendDate; IsSigned = isSigned; IsEncrypted = isEncrypted; Guid = System.Guid.NewGuid().ToString(); DateCreated = DateTime.Now; DateLastEdited = DateTime.Now; SendingStatus = EmailSendStatus.PENDING; }
public Email(int id, string guid, EmailAccount from, EmailContact to, string subject, string message, bool isHtml, string batchId, DateTime initialSendDate, bool isSigned, bool isEncrypted, EmailSendStatus sendingStatus, DateTime dateCreated, string createdBy, DateTime dateLastEdited, string lastEditedBy) { Id = id; Guid = guid; From = from; To.Add(to); Subject = subject; Message = message; IsHtml = isHtml; BatchId = batchId; SendDate = initialSendDate; IsSigned = isSigned; IsEncrypted = isEncrypted; SendingStatus = sendingStatus; DateCreated = dateCreated; CreatedBy = createdBy; DateLastEdited = dateLastEdited; LastEditedBy = lastEditedBy; }
public Email(EmailAddress to, string subject, string htmlBody = null, string textBody = null) { To.Add(to); Subject = subject; HtmlBody = htmlBody; PlainTextBody = PlainTextBody; }
//public AttachmentCollection Attachments { get; } //public AlternateViewCollection AlternateViews { get; } private void Load(MailMessage m) { IsBodyHtml = m.IsBodyHtml; Priority = m.Priority; BodyTransferEncoding = m.BodyTransferEncoding; DeliveryNotificationOptions = m.DeliveryNotificationOptions; if (m.Sender != null) { Sender = new MailAddressSerializable(m.Sender.Address, m.Sender.DisplayName); } if (m.From != null) { From = new MailAddressSerializable(m.From.Address, m.From.DisplayName); } foreach (MailAddress a in m.To) { To.Add(new MailAddressSerializable(a.Address, a.DisplayName)); } foreach (MailAddress a in m.CC) { CC.Add(new MailAddressSerializable(a.Address, a.DisplayName)); } foreach (MailAddress a in m.Bcc) { Bcc.Add(new MailAddressSerializable(a.Address, a.DisplayName)); } foreach (MailAddress a in m.ReplyToList) { ReplyToList.Add(new MailAddressSerializable(a.Address, a.DisplayName)); } Subject = m.Subject; Body = m.Body; //output.AlternateViews = input.AlternateViews; //output.Attachments = input.Attachments; }
public async Task CreateUserAsync(ViewModel.VM_User user) { To.Add(user.EmailAddress); From = System.Configuration.ConfigurationManager.AppSettings["emailSender"]; Subject = "Hi"; await(Email("CreateUser", user).DeliverAsync()); }
// // GET: /Mailers/ public EmailResult Bday(Employee manager, Employee employee) { ViewBag.Employee = employee; Subject = "היום יום הולדת ל" + employee.FullName; To.Add(manager.Email); return(Email("Bday", manager)); }
public EmailResult Subscription(EmailTemplate message, string email) { To.Add(email); Subject = "HelpDesk уведомление"; MessageEncoding = Encoding.UTF8; return(Email("Subscription", message)); }
public RazorEmailResult SendChangeEmailRequestNotice(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Email Request Notice"; return(Email("SendChangeEmailRequestNotice", model)); }
public void AddTo(Player player) { if (!To.Contains(player.Name)) { To.Add(player.Name); } }
public RazorEmailResult SendEmailChangedNotice(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Email Changed Notification"; return(Email("SendEmailChangedNotice", model)); }
// GET: Admin/Email public EmailResult SendEmail(EmailModel model) { To.Add(model.Recepient); From = model.Sender; Subject = model.Subject; return(Email("SendAdminAssignEmail", model)); }
public virtual EmailResult TrialExpired() { Subject = "Trial Membership Conclusion"; To.Add("*****@*****.**"); return(this.Email(viewName: "TrialExpiredEmail")); }
public RazorEmailResult SendAccountVerified(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Account Verification"; return(Email("SendAccountVerified", model)); }
public EmailResult Subscription(string message, string email) { To.Add(email); Subject = "Рассылка"; MessageEncoding = Encoding.UTF8; return(Email("Subscription", message)); }
public RazorEmailResult SendPasswordReset(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Password Reset"; return(Email("SendPasswordReset", model)); }
internal EmailResult LotterySelectionEMail(LotterySelectionMailModel model) { To.Add(model.User.Email); Subject = $"Wahlverfahren {model.Lottery.Name}: Ihre Auswahl"; return(Email("LotterySelectionEMail", model)); }
public RazorEmailResult SendAccountNameReminder(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Here's your missing Username"; return(Email("SendAccountNameReminder", model)); }
public EmailResult SendMailReport(ReportModel model) { To.Add(Constants.FromInbox); From = Constants.FromInbox; Subject = "Massa News | Reportar erro"; return(Email("SendMailReport", model)); }
public RazorEmailResult SendPasswordChangeNotice(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Your Password has been updated"; return(Email("SendPasswordChangeNotice", model)); }
public bool Add(NodeInput inp, bool triggerAddEvent = true) { if ((inp.Type & Type) != 0) { if (inp.Input != null) { inp.Input.Remove(inp); } if (triggerAddEvent) { inp.Input = this; } else { inp.AssignInput(this); } To.Add(inp); if (triggerAddEvent) { if (OnInputAdded != null) { OnInputAdded(this); } } return(true); } return(false); }
public RazorEmailResult SendAccountDelete(User model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Delete Account"; return(Email("SendAccountDelete", model)); }
/// <summary> /// Праќа маил до избраните институции за барањето /// пр.(ЕВН, Водовод) /// </summary> /// <returns></returns> //public void SendEmailToInstitution(SendEmailToInstitutionViewModel model) //{ // To.Add(model.To); // From = model.FromMail; // Subject = "Се бара мислење за предмет"; // SendEmail(Email("SendEmailToInstitution", model)); //} public void SendForgotPasswordInformation(SendForgotPasswordInformationViewModel model) { To.Add(model.To); From = ConfigurationManager.AppSettings["FromMail"]; Subject = "Рестартирање на лозинка"; SendEmail(Email("SentForgotPasswordInformation", model)); }
public RazorEmailResult WeeklyFavorite(FavoriteTweetViewModel viewModel) { From = "*****@*****.**"; To.Add(viewModel.User.Email); Subject = "Your favorite tweets!"; return(Email("FavoriteTweet", viewModel)); }