TextMailProcess |
![]() ![]() ![]() |
TextMailProcess can be used to send text based e-mails to mail recipient with or without attachments.
Note that this process connects to the SMTP server when its prepare() method is called, accumulates the mails during processRecord() method calls and sends the mails when its finalizeProcess() method is called.
Parameters smtpAccount (Accepts MScript) The SMPT account defined with smtpAccount configuration element. to,cc,bcc (Accepts MScript) These elements define the mail recipients. subject (Accepts MScript) The subject text of your E-mail message. The subject text is encoded using the encoding of the current page. message (Accepts MScript) The message text of your E-mail message. The message text is encoded using the encoding of the current page. attachs (Accepts MScript) One or more file names can be specified in this parameter (by delimiting them with commas) as mail attachments. The names can be defined relative to the web application root or can be absolute file names. Syntax: [attachment-name | ] file-name [, [attachment-name | file-name ] ]
attachment-name The name of the attachment that will appear in the e-mail. When this optional parameter is omitted the file-name is used as the attachment name.
file-name The name of the file to be attached. It can be an absolute file path or it can be defined relative to the web application root. A process block field name or a pool variable name can also be given instead of a file name. If this is the case the PB field or pool variable should contain the file object of the file. Using this feature, for example, a PDF document created and placed in a pool variable as a file object by a preceding process can be attached to the e-mail. Examples:
How does the process work? - prepare() method of the process establishes a connection with the specified SMTP server |