public static EmailMessage GetMessage(Config config, EmailQueue mail) { var message = new EmailMessage { FromName = mail.FromName, FromEmail = mail.FromEmail, ReplyToEmail = mail.ReplyTo, ReplyToName = mail.ReplyToName, Subject = mail.Subject, SentTo = mail.SendTo, Message = mail.Message, Type = Type.Outward, EventDateUtc = DateTimeOffset.UtcNow, Status = Status.Unknown }; return message; }
public static EmailMessage GetMessage(Config config, EmailQueue mail) { var message = new EmailMessage { FromName = mail.FromName, FromEmail = mail.ReplyTo, Subject = mail.Subject, SentTo = mail.SendTo, Message = mail.Message, Type = Type.Outward, EventDateUtc = DateTime.UtcNow, Status = Status.Unknown }; if (string.IsNullOrWhiteSpace(message.FromEmail)) { message.FromName = config.FromName; message.FromEmail = config.FromEmail; } return message; }
public static async Task AddToQueueAsync(string database, EmailQueue queue) { await Factory.InsertAsync(database, queue, "config.email_queue", "queue_id").ConfigureAwait(false); }
public MailQueueManager(string database, EmailQueue mail) { this.Database = database; this.Email = mail; }
public MailQueueManager(string catalog, EmailQueue mail) { this.Catalog = catalog; this.Email = mail; }
public static void AddToQueue(string catalog, EmailQueue queue) { Factory.Insert(catalog, queue, "config.email_queue", "queue_id"); }
public MailQueueManager(string catalog, EmailQueue mail) { Catalog = catalog; Email = mail; }