public void Notify(int?accountId, string mailTo, string mailCc, string mailBcc, string subject, string body) { var sender = new NotificationGenerator { MailAccountId = accountId, To = mailTo, Cc = mailCc, Bcc = mailBcc, Subject = subject, Body = body }; sender.Send(); }
public void Notify(int?accountId, string mailTo, string mailCc, string mailBcc, string subject, string body, int?bAccountId, int?contactId, Guid?refNoteId, Tuple <string, byte[]>[] attachments) { var sender = new NotificationGenerator { MailAccountId = accountId, To = mailTo, Cc = mailCc, Bcc = mailBcc, Subject = subject, Body = body, BAccountID = bAccountId, ContactID = contactId, RefNoteID = refNoteId }; foreach (var attachment in attachments) { sender.AddAttachment(attachment.Item1, attachment.Item2); } sender.Send(); }