Beispiel #1
0
    public void SendMail()
    {
        var emails = db.Emails.ToList();

        foreach (var email in emails)
        {
            //code for sending mail here...

            if (!EmailSenderContext.CanSend())
            {
                break;
            }
        }
    }
Beispiel #2
0
 public void StopMail()
 {
     EmailSenderContext.ChangeSendState(false);
 }