SmtpJobsPending Property
Gets the list of send-mail (sending a single message or mail-merge) tasks ready for processing.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public SendMailJobCollection JobsPending { get; }

Property Value

Type: SendMailJobCollection
The list of single-message or mail-merge jobs ready for processing.
Remarks

JobsPending queue consists of items which are either jobs to process a single or multiple e-mails.

A single e-mail job can either be a task to process a completed e-mail supplied by the application or an index in a data table row and an e-mail template with which to merge this data row.

A multiple e-mails job is a task to perform mail merge over multiple data table rows with an e-mail template. Such job will be split into multiple smaller jobs (one per data row) during processing.

Once JobsPending queue has been populated (with AddJob(String, String, EmailAddressCollection) method and its overloads), the developer can start processing jobs. To send the resulting e-mails out, call SendJobs method. To make the resulting e-mails be submitted to MailBee.NET Queue or IIS SMTP pickup folder, use SubmitJobsToPickupFolder(String, Boolean) method.

Once jobs processing has been started, jobs which involve processing a single e-mail (single-message jobs) are taken from JobsPending one by one and moved into JobsRunning collection. If the particular job involves processing multiple e-mails (multi-job), MailBee "extracts" a new job from the multi-job and places the newly created job into JobsRunning collection. The multi-job remains in JobsPending collection but the data row index assigned to the newly created job is removed from the internal pending data rows list of the multi-job. This process repeats itself until only a single data row index is left in the multi-job, and this makes it a single-message job. Finally, it will be moved into JobsRunning collection just like any other simple job.

Once processing of a job is finished, it's moved from JobsRunning into JobsSuccessful or JobsFailed collections. Mail merge jobs which were split into simple jobs during processing are NOT assembled back into a single object. This allows the developer to analyze the mailing process results on per e-mail level.

If some jobs failed during the processing and ended up in JobsFailed collection, they can be added back to JobsPending queue using RetryFailedJobs method.

See Also