SendMailJobCollection Class
Represents a collection of assigned tasks of sending e-mails.
Inheritance Hierarchy

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public class SendMailJobCollection : ICollection, 

The SendMailJobCollection type exposes the following members.

Public methodAdd
Adds a send-mail job into the collection.
Public methodClear
Removes all elements from the collection.
Public methodCopyTo
Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that can iterate through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIndicesAsArray
Returns the integer array containing list of data table row indices associated with the jobs belonging to the collection.
Public methodCode exampleGetIndicesAsString
Returns the string containing comma-separated list of data table row indices associated with the jobs belonging to the collection.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the specified SendMailJob from the collection.
Public methodRemoveAt
Removes the job with the specified index from the collection.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public propertyCount
Gets the number of elements contained in the collection.
Public propertyIsReadOnly
Gets whether the collection may not be modified.
Public propertyIsSynchronized
Gets a value indicating whether access to the collection is synchronized (thread-safe).
Public propertyItem
Gets the element at the specified index.
Public propertySyncRoot
Gets an object that can be used to synchronize access to the collection.

In MailBee, instances of this class contain lists of mail messages or mail merge tasks which will be (or already have been) processed.

JobsPending, JobsRunning, JobsSuccessful, and JobsFailed properties of Smtp class have SendMailJobCollection type.

JobsPending contains jobs to be processed, JobsRunning - currently being processed, JobsSuccessful and JobsFailed - finished jobs.

During processing, jobs migrate between the collections (i.e. the job which had originally been placed into JobsPending moves into JobsRunning when processing starts, and ends up in JobsSuccessful or JobsFailed).

However, mail merge jobs may spawn additional jobs. I.e. if a mail merge job of processing 10 data table rows goes into processing, it resides in JobsPending for a while (and the number of rows yet to be processed sequentially decrements to 9, 8, etc). At the same time, rows which are being processed are converted into SendMailJob objects representing tasks to process a single data row as mail merge. Thus, usually mail merge of 10 data rows (a single job) finally ends up in 10 SendMailJob objects in JobsSuccessful or JobsFailed collections. To change this behavior, create mail merge jobs using Smtp.AddJob(string, string, EmailAddressCollection, DataTable, object, bool, bool) overload or its IDataReader version (Smtp.AddJob(string, string, EmailAddressCollection, IDataReader, object, bool, bool)).

Note Note
In .NET Core and UWP apps, only single-message mail jobs are supported. There is no mail merge over database support.
See Also