/** * Set the type of the email * * @param Type Type of the email * @since V2.0 */ public void SetType(ContactEmailType Type) { this.Type = Type; }
/** * Constructor used by the implementation * * @param Type Type of the email * @param Primary Is email primary * @param Email Email of the contact * @since V2.0 */ public ContactEmail(ContactEmailType type, bool primary, string email) : base() { this.Type = Type; this.Primary = Primary; this.Email = Email; }
public ActionResponse SendContactEmail(EmailModel model, string senderName, string senderEmail, string projectTitle, ContactEmailType emailType) { ActionResponse response = new ActionResponse(); if (emailType == ContactEmailType.Help) { model.Subject = HELP_REQUEST + model.Subject; } else if (emailType == ContactEmailType.Information) { model.Subject = INFORMATION_REQUEST + model.Subject; } StringBuilder strBuilder = new StringBuilder("<h4>Information request for project ("); strBuilder.Append(projectTitle); strBuilder.Append(")</h4>"); strBuilder.Append("<br><b>Sender name:</b>"); strBuilder.Append(senderName); strBuilder.Append("<br><b>Sender email:</b>"); strBuilder.Append(senderEmail); strBuilder.Append("<br><br><b>Message</b><br>"); strBuilder.Append(model.Message); model.Message = strBuilder.ToString(); return(emailHelper.SendEmailToUsers(model.EmailsList, model.Subject, model.Subject, model.Message, model.FooterMessage)); }