SmtpJobsRunning Property
Gets the list of e-mail tasks being processed right now.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public SendMailJobCollection JobsRunning { get; }

Property Value

Type: SendMailJobCollection
The list of jobs currently being processed.

Jobs processing starts when the application calls such methods as SendJobs, BeginSendJobs(AsyncCallback, Object), SendMailMerge(String, EmailAddressCollection, DataTable), or SubmitJobsToPickupFolder(String, Boolean).

Jobs are processed in the following order:

  • Jobs are taken one by one from JobsPending and placed into JobsRunning collection (for mail-merge jobs, see details in JobsPending topic)
  • During processing, jobs stay in JobsRunning
  • When a particular job has finished processing, it gets to JobsSuccessful if processed successfully or into JobsFailed if the e-mail message associated with this job was not sent (or not submitted to the pickup folder in the case of SubmitJobsToPickupFolder(String, Boolean) method)

By default, multi-thread mode is off (MaxThreadCount is 1), so that only 1 job is processed per moment and number of items in JobsRunning never exceeds 1.

Note Note
The application can monitor JobsRunning collection only while any method which processes jobs is running. Once job processing finishes, JobsRunning will always be empty. To monitor JobsRunning and other job collections directly during job processing (i.e. not waiting until job processing completes), subscribe to Smtp class events, or start jobs processing with BeginSendJobs(AsyncCallback, Object) method, or both. To synchronize access to these collections in multi-thread environment, use JobsSyncRoot property.
See Also