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); } }
public void Add() { if (!IsEnabled()) { return; } MailQueue.AddToQueue(Catalog, Email); }