상속: IPoco
예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
파일: MailQueue.cs 프로젝트: frapid/frapid
 public static async Task AddToQueueAsync(string database, EmailQueue queue)
 {
     await Factory.InsertAsync(database, queue, "config.email_queue", "queue_id").ConfigureAwait(false);
 }
예제 #4
0
 public MailQueueManager(string database, EmailQueue mail)
 {
     this.Database = database;
     this.Email = mail;
 }
예제 #5
0
 public MailQueueManager(string catalog, EmailQueue mail)
 {
     this.Catalog = catalog;
     this.Email = mail;
 }
예제 #6
0
 public static void AddToQueue(string catalog, EmailQueue queue)
 {
     Factory.Insert(catalog, queue, "config.email_queue", "queue_id");
 }
예제 #7
0
 public MailQueueManager(string catalog, EmailQueue mail)
 {
     Catalog = catalog;
     Email = mail;
 }