MailBee.NET Objects 4.0

SendMailJob Class

Represents a task to send (or submit to the pickup folder) a single e-mail message or a series of e-mail messages created as a mail merge of a data table and an e-mail template.

For a list of all members of this type, see SendMailJob Members.

System.Object
   MailBee.SmtpMail.SendMailJob

public class SendMailJob

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Send-mail job is a task for MailBee to create and/or send individual mail message or a series of messages based on a common template (mail merge).

Jobs can be created using AddJob method of Smtp class (there are several overloads for mail merge and single message jobs).

Once one or more jobs have been added to the JobsPending queue, the developer can request to start processing of these jobs. This processing usually involves sending out e-mail messages contained in jobs or submitting these e-mail messages to a pickup folder for direct delivery to the SMTP server or MailBee Message Queue if it's installed on the same machine where MailBee-powered application is running.

To start processing jobs, use SendJobs, BeginSendJobs, or SubmitJobsToPickupFolder methods.

When the job assumes sending of a single e-mail message, no extra jobs are created. However, when the job is a mail merge job (and thus actually assumes creating and sending multiple messages), MailBee processes such job via creating a series of individual mail merge jobs (each of them assumes sending a single e-mail message). For instance, if a mail merge job for processing 100 data rows has been put into processing, MailBee will finally end up with 100 items total in JobsSuccessful and JobsFailed collections. This default behavior, however, can be changed with AddJob overload.

Note   The easiest way to perform mail merge is using SendMailMerge method. It can be used to put a "mail merge over database" job into the queue and immediately process it, doing mail merge for each row in the data table with a e-mail template and then sending out resulting e-mail messages.

Requirements

Namespace: MailBee.SmtpMail

Assembly: MailBee.NET (in MailBee.NET.dll)

See Also

SendMailJob Members | MailBee.SmtpMail Namespace | AddJob | SendMailMerge