public static Get ( string tenant ) : |
||
tenant | string | |
리턴 |
public async Task AddAsync() { this.Processor = SmsProcessor.GetDefault(this.Database); if (!this.IsEnabled()) { return; } var config = new SmsConfig(this.Database, this.Processor); if (string.IsNullOrWhiteSpace(this.Sms.FromName)) { this.Sms.FromName = config.FromName; } if (string.IsNullOrWhiteSpace(this.Sms.FromNumber)) { this.Sms.FromNumber = config.FromNumber; } var sysConfig = MessagingConfig.Get(this.Database); if (sysConfig.TestMode) { this.Sms.IsTest = true; } await TextMessageQueue.AddToQueueAsync(this.Database, this.Sms).ConfigureAwait(false); }
public void Add() { this.Processor = EmailProcessor.GetDefault(this.Database); if (!this.IsEnabled()) { return; } var config = new Config(this.Database, this.Processor); this.Email.ReplyTo = this.Email.ReplyTo.Or(""); this.Email.ReplyToName = this.Email.ReplyToName.Or(""); if (string.IsNullOrWhiteSpace(this.Email.FromName)) { this.Email.FromName = config.FromName; } if (string.IsNullOrWhiteSpace(this.Email.FromEmail)) { this.Email.FromEmail = config.FromEmail; } var sysConfig = MessagingConfig.Get(this.Database); if (sysConfig.TestMode) { this.Email.IsTest = true; } if (this.IsValidEmail(this.Email.FromEmail) && this.IsValidEmail(this.Email.SendTo)) { MailQueue.AddToQueue(this.Database, this.Email); } }