private void EmailLinkButton_Click(object sender, EventArgs e) { string tranId = this.GetTranId(); string emailTemplate = this.emailHidden.Value; if (string.IsNullOrWhiteSpace(tranId)) { return; } if (string.IsNullOrWhiteSpace(emailTemplate)) { return; } if (string.IsNullOrWhiteSpace(this.PartyEmailAddress)) { return; } if (Messaging.Email.Helpers.Config.IsEnabled(AppUsers.GetCurrentUserDB())) { EmailHelper email = new EmailHelper(this.Catalog, emailTemplate, this.Text + " #" + tranId, this.PartyEmailAddress, this.AttachmentFileName); email.SendEmail(); this.subTitleHeading.InnerText = string.Format(CultureManager.GetCurrent(), Labels.EmailSentConfirmation, this.PartyEmailAddress); return; } this.subTitleHeading.Attributes.Add("class", "ui red header"); this.subTitleHeading.InnerText = Warnings.CannotSendEmailSMTPInvalid; }
private void EmailLinkButton_Click(object sender, EventArgs e) { string tranId = this.GetTranId(); string emailTemplate = this.emailHidden.Value; if (string.IsNullOrWhiteSpace(tranId)) { return; } if (string.IsNullOrWhiteSpace(emailTemplate)) { return; } if (string.IsNullOrWhiteSpace(this.PartyEmailAddress)) { return; } EmailHelper email = new EmailHelper(this.Catalog, emailTemplate, this.Text + " #" + tranId, this.PartyEmailAddress, this.AttachmentFileName); email.SendEmail(); this.subTitleLiteral.Text = string.Format(CultureInfo.CurrentCulture, Labels.EmailSentConfirmation, this.PartyEmailAddress); }