/// <summary> /// Sends issue to testing email addresses. /// </summary> /// <returns>True when everything went ok</returns> private bool SendDraft() { string draftEmails = txtSendDraft.Text.Trim(); if (String.IsNullOrEmpty(draftEmails)) { ErrorMessage = GetString("newsletter.recipientsmissing"); } else if (!ValidationHelper.AreEmails(draftEmails)) { ErrorMessage = GetString("newsletter.wrongemailformat"); } else { IssueSender sender = new IssueSender(IssueInfoProvider.GetIssueInfo(IssueID)); sender.SendAsync(draftEmails); } return(String.IsNullOrEmpty(ErrorMessage)); }
protected void btnSend_Click(object sender, EventArgs e) { // Check field for emptyness if (string.IsNullOrEmpty(txtSendDraft.Text) || (txtSendDraft.Text.Trim().Length == 0)) { ShowError(GetString("newsletter.recipientsmissing")); } // Check e-mail address validity else if (!ValidationHelper.AreEmails(txtSendDraft.Text.Trim())) { ShowError(GetString("newsletter.wrongemailformat")); } else { IssueSender issueSender = new IssueSender((IssueInfo)EditedObject); issueSender.SendAsync(txtSendDraft.Text.Trim()); // Close the dialog ScriptHelper.RegisterStartupScript(this, GetType(), "ClosePage", "if (CloseDialog) { CloseDialog(); }", true); } }
protected void btnSend_Click(object sender, EventArgs e) { // Check field for emptyness if (string.IsNullOrEmpty(txtSendDraft.Text) || (txtSendDraft.Text.Trim().Length == 0)) { ShowError(GetString("newsletter.recipientsmissing")); } // Check e-mail address validity else if (!ValidationHelper.AreEmails(txtSendDraft.Text.Trim())) { ShowError(GetString("newsletter.wrongemailformat")); } else { IssueSender issueSender = new IssueSender((IssueInfo)EditedObject); issueSender.SendAsync(txtSendDraft.Text.Trim()); // Close the dialog ScriptHelper.RegisterStartupScript(this, GetType(), "ClosePage", "if (CloseDialog) { CloseDialog(); }", true); } }
/// <summary> /// Sends issue to testing email addresses. /// </summary> /// <returns>True when everything went ok</returns> private bool SendDraft() { string draftEmails = txtSendDraft.Text.Trim(); if (String.IsNullOrEmpty(draftEmails)) { ErrorMessage = GetString("newsletter.recipientsmissing"); } else if (!ValidationHelper.AreEmails(draftEmails)) { ErrorMessage = GetString("newsletter.wrongemailformat"); } else { IssueSender sender = new IssueSender(IssueInfoProvider.GetIssueInfo(IssueID)); sender.SendAsync(draftEmails); } return String.IsNullOrEmpty(ErrorMessage); }