SendMailJob Class |
Namespace: MailBee.SmtpMail
The SendMailJob type exposes the following members.
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetIndicesAsString |
Returns the string containing comma-separated list of data table row indices yet to be processed as mail merge.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DsnSettings |
Gets a reference to the delivery status notification settings for the mail message (or their patterns for mail merge jobs).
| |
ErrorReason |
Gets the reason of the error which prevented the mail message from being sent or submitted to the pickup folder.
| |
IsMessageSent |
Gets if the message was successfully sent or submitted to the pickup folder.
| |
MergeDataReader |
Gets the data reader for the mail merge.
| |
MergeDataReaderColumnNames |
Gets the array of all fields' names of the current row of the data reader.
| |
MergeDataReaderRowValues |
Gets the array of all fields' values of the current row of the data reader.
| |
MergedDsnSettings |
Gets a reference to the delivery status notification settings produced by mail merge process.
| |
MergedMessage |
Gets a reference to the mail message produced as a result of mail merge of the template with a data row.
| |
MergedRecipients |
Gets the list of the actual recipients produced by mail merge process.
| |
MergedSenderEmail |
Gets the actual sender e-mail address string produced by mail merge process.
| |
MergeRowIndex |
Gets the index of the data row used for mail merge of this message.
| |
MergeTable |
Gets the data table for the mail merge.
| |
Message |
Gets a reference to the mail message object to be sent or merged.
| |
MessageFilename |
Gets the path of the e-mail file which contain the message to be sent.
| |
PreferXSenderXReceiver |
Gets if "X-Sender" and "X-Receiver" message headers have priority over any other method of specifying sender and recipients for this message.
| |
Recipients |
Gets the list of the actual recipients of the mail message (or its pattern for mail merge jobs).
| |
SenderEmail |
Gets the actual sender e-mail address string (or its pattern for mail merge jobs).
| |
Tag |
Gets the tag assigned by the developer to this job.
|
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).
Note |
---|
Mail merge over database is not supported in .NET Core and UWP apps yet. |
Jobs can be created using AddJob(String, String, EmailAddressCollection) 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.NET Queue if it's installed on the same machine where MailBee-powered application is running.
To start processing jobs, use SendJobs, BeginSendJobs(AsyncCallback, Object), or SubmitJobsToPickupFolder(String, Boolean) 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(String, String, EmailAddressCollection, DataTable, Object, Boolean, Boolean) overload.
Note |
---|
The easiest way to perform mail merge is using SendMailMerge(String, EmailAddressCollection, DataTable) 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. |