Creating a Direct Mailer Job File
Before you create a stand-alone Direct Mailer job, you must create a Direct Mailer job file that specifies information about the job, such as whether it delivers personalized message bodies, the format of mail message headers, and the location of the list of recipients.
You can create a job file using any text editor. The job file must be a text file that is compatible with Microsoft Windows .ini file format.
Add the following sections to your job file:
- Job Data Section. Specify key parameters about the job, such as the data source for the content, list of recipients, message format type, subject, and opt-out list.
- Job Attachments Section. This section is optional. Specify the number and the source of the attachments.
After Direct Mailer runs, it writes a Results section in the job file. The parameters in the Results section are JobID, ErrorCode, and ErrorString. If a job is successful, JobID and an ErrorCode=0 are written. If a job was unsuccessful, the JobID, the ErrorCode number, and the ErrorString are written.
Job Data Section
The following table lists the parameters that you can define for job data in the job file.
Parameter | Type | Description |
---|---|---|
JobDesc | string (128 max) | Optional. Type a description for the job. |
TemplateURL | string (2084 max) | Optional. Specify the mail template source in Uniform Resource Locator (URL) form, either http:// or file://. If you are using a flat file as the template, type a full server-centric local path name. Universal naming convention (UNC) path names are supported. |
MailFrom | string (256 max) | Required. Type the From field of the e-mail. |
MailSubject | string (256 max) | Optional. Type the Subject field of the e-mail. |
MailReplyTo | string (256 max) | Optional. Type the e-mail address that will receive responses. |
DefaultFmt | integer | Optional. Specify the default message format for the content to be mailed.
1 - Plain text |
JobLocale | string (255 max) | Optional. Specify the default locale for the job. |
MailPersonalize | integer | Optional. Specify whether you are delivering personalized content.
1 – You are delivering personalized content 0 - You are not delivering personalized content Notes
|
MailingListType | integer | Required. Specify the mailing list type.
1 - Flat file |
MailingListLocation | string (256 max) | Required. Specify the location of the mailing list.
For flat files, specify the full, local, server-centric path name. Do not include any schema prefixes, such as file://. For SQL Server queries, specify the connection string. For List Manager lists, specify the list identification number. UNC path names are supported. |
MailingListSQL | string (256 max) | Specify the SQL statement to mail from. A value is required if the MailingListType= 3, otherwise, it is ignored. |
OptoutListType | integer | Optional. Specify the opt-out list type.
1 - Flat file |
OptoutListLocation | string (256 max) | Optional. Only required if OptoutListType is used. Specify the location of the opt-out list.
For flat files, specify the full, local, server-centric pathname. Do not include any schema prefixes, such as file://. For SQL Server queries, specifies the connection string. For List Manager lists, specifies the list identification number. UNC path names are supported. |
OptoutListSQL | string (256 max) | Specify the SQL statement to opt-out from. A value is required if the OptoutListType= 3, otherwise, it is ignored. |
UserFlags | integer | Optional. Specifies any user-defined flags associated with the job. |
Job Attachments Section
The following table lists parameters you can define for job attachments. This section of the job file is optional.
Parameter | Type | Description |
---|---|---|
AttachmentCount | integer | Specify the number of attachments (greater than 0). |
Attachment_<n> | string (2084 max) | Specify the attachment URL or file system path for the <n> attachment, where n is a number between 1 and the number specified for AttachmentCount. Verify that the URL includes a schema prefix, such as http:// or file://.
For file attachments, include the full, server-centric path name. UNC path names are supported. |
Results Section
After Direct Mailer runs, it writes a Results section to the job file. The following table lists the parameters that Direct Mailer writes to the Results section.
Parameters | Type | Description |
---|---|---|
ErrorCode | HRESULT | 0 - The operation (create, start, delete, and so forth) ran successfully. If the operation was unsuccessful, an error code is written. |
ErrorString | string (256 max) | If the ErrorCode indicates the job did not complete successfully, this parameter includes descriptive text explaining the error. Otherwise, this field is blank. |
JobID | GUID | This parameter specifies the new job ID that can be used for starting, stopping, or handling this job. |
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.