Share via


Creating a Direct Mailer Job File

Before you create a stand-alone Direct Mailer job, you need to 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 Job ID, 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. Specify a description of 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. Specify the From field of the e-mail.
MailSubject string (256 max) Optional. Specify the Subject field of the e-mail address.
MailReplyTo string (256 max) Optional. Specify 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
2 = MIME Encapsulation of Aggregate HTML Documents (MIME)
3 = MIME Encapsulation of Aggregate HTML Documents (MHTML)

JobLocale string (255 max) Optional. Specify the default locale for the job.
MailPersonalize integer Optional. Specify 1 if you are delivering personalized content, and 0 if you are not delivering any personalized content.

Ee823670.note(en-US,CS.10).gif Note

  • Any non-integer (any character value(s)) will have the same effect as entering "MailPersonalize=0".

  • Any non-zero integer will have the same effect as entering "MailPersonalize=1".
MailingListType integer Required. Specify the mailing list type.

1 = Flat file
2 = List Manager list
3 = SQL Server query

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
2 = List Manager list
3 = SQL Server query

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 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 = Operation (create, start, delete, and so forth) ran successfully. If unsuccessful, the error code is written.
ErrorString string (256 max) If ErrorCode indicates the job did not complete successfully, this parameter will include 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

Opt Out Lists


All rights reserved.