Inheritance: Microsoft.WindowsAzure.StorageClient.TableServiceEntity
        public void Send(MailMessage msg)
        {
            var time = DateTime.UtcNow;

            var partitionKey = time.Date.ToString("yyyyMMdd");
            var rowKey       = Guid.NewGuid().ToString("N");

            if (this.IsReplay(partitionKey, rowKey))
            {
                return;
            }

            var m = new MailMessageTableEntity
            {
                PartitionKey = partitionKey,
                RowKey       = rowKey,
                Body         = msg.Body,
                Recipients   = msg.To.Select(a => a.ToString()).Aggregate((x, y) => x + "; " + y),
                Sender       = msg.From.ToString(),
                Subject      = msg.Subject
            };

            this.context.AddMailMessage(m);
            this.context.SaveChanges();
        }
        public void Send(MailMessage msg)
        {
            var time = DateTime.UtcNow;

            var partitionKey = time.Date.ToString("yyyyMMdd");
            var rowKey = Guid.NewGuid().ToString("N");
            if (this.IsReplay(partitionKey, rowKey))
            {
                return;
            }

            var m = new MailMessageTableEntity
            {
                PartitionKey = partitionKey,
                RowKey = rowKey,
                Body = msg.Body,
                Recipients = msg.To.Select(a => a.ToString()).Aggregate((x, y) => x + "; " + y),
                Sender = msg.From.ToString(),
                Subject = msg.Subject
            };

            this.context.AddMailMessage(m);
            this.context.SaveChanges();
        }
Exemple #3
0
 public void AddMailMessage(MailMessageTableEntity m)
 {
     this.AddObject(MailContext.tableName, m);
 }
Exemple #4
0
 public void AddMailMessage(MailMessageTableEntity m)
 {
     this.AddObject(MailContext.tableName, m);
 }