Tornado API Library - V12.30.08

z.dbMail Property

Set Email properties for ASPdbSendMail, Upload and Edit. (DoNet 1.x)

Product Version


Property Value

Obj.dbMail = "From | To | SQLto| DSNto | Cc | Bcc | Subject | Body | Encoding | Format | Priority | Base | Loc | Attach | NameValue | SMTPserver | BatchSize | IgnoreError | Visual | TestRun | Lapse| trigger| NestedBody| Notify"

FromMailObj.From address.
ToMailObj.To - This parameter has 4 formats -
  1. Address
  2. Address1; Address2; Address3 (Delimiter must be ;)
  3. #field# with BatchSize > 0 (Address only)
  4. #field# with BatchSize = 0 (MagicEmail - To, Subject and Body)
SQLtoUse this SQL query to supply the required data in - To, Subject and Body fields. All is required in these parameters (magicfield) are #fieldnumber#. Result from recordset RS(fieldnumber) will fill these macro tags. Fieldnumber is 0 based. batchsize MUST BE 0 for MagicField process.

e.g. Obj.dbMail = "|| to=#0# | SQLto=Select * From test3.Csv| Batchsize=0| Subject=#1#| IgnoreError = true | Visual = 2 | TestRun = true | Body = #2#"

DSNtoData source of the "Send To" SQL query. Def=dbDSN.
Cc MailObj.Cc address
Bcc MailObj.Bcc address
Subject Mail.Obj.Subject text.
Body MailObj.Body has the following formats -
  1. Plain Text. No text processing will be done.
  2. Plain Ascii File. File=Filename. The filename is the name of a template file (virtual or physical). This template file can be the same file used in display and is processed the same way as ASPdbSendTemplate. If this option is used the Mail format will be forced to be HTML type.
  3. Any Text template source with embedded Macros to be stuffed by the SQL a la 'Mail Merge'
  4. Body=[[Email]]. In this case the SendTemplate upstream specifies 'email' as action and no display. The output from the module is passed along and fill the [[Email]] tag.
  5. Body=[[Email(Unit)]]. In this case Email pick the particular 'unit' output as the body and do not observe SendTemplate. (short Cut)
EncodingDifferent BodyEncoding scheme - ascii, bigendianunicode, unicode, utf7, utf8
Format0=HTML | 1=Plain Text(Def)
Priority0=low(Def) 1=normal 2=high
BaseContent Base and Location are used to retrieve images files.

e.g. Content Base=" Location=Directory/

Images will be prefixed as -

Loc URL Content location
AttachMailObj.AttachFile -> Filename, Caption, Encode_Method; ...repeat... (Use group to delimit different attached files and field to delimit Caption and encode).

Encode method defaults to UUENCODE (0). Use (1) for Base_64 encoding. Each file attached requires the above 3 parameters. Parameters cannot be skipped. Only Encode can be left as blank indicating a default of 0.

If Caption file name has no extension, a 'dat' extension will be attached. e.g. Attach = e:\vdata\article\temp.asp,Tem.txt; e:\vdata\article\Stock.csv, Stock.csv,0"

name=ValueSend custom headers via -> HeaderName1=Value1, HeaderName2=Value2....

To obtain a reciept of the email, use ->

SMTPServerName of SMTP server sending the mail (Def=localhost)
BatchSize How many address to send at one time. This parameter has 3 cases -
  1. User supplied multiple addresses like add1; add2; add3 (BatchSize > 0)
  2. Use DB column as addresses (BatchSize > 0)
  3. Use MagicEmail DB fields and send ONE address at a time. (BatchSize = 0)
IgnoreErrorSet to false will cause the mail sending action to quit upon an error.
VisualDisplay the sending status. 0=No display |1=address only |2=Address and Body
TestRunDoes everything except sending. No lapse time in test run.

(Must set this to False to execute)

Lapse Sleep time in between each send. If you don't do that, your ISP will pull your plug. (Def=0)
Trigger Value=Add. Triggers Email in Edit Add. For now only Edit Add and Upload. Note that 'Upload' trigger is done in the system internally. Just define dbMail in the Upload module will trigger that.

Obj.dbMail = " |;#2#| Subject=My Subject at (" & Now() & ")| Body=My Message body|TestRun=false| trigger=add|"

NestedBodyTrue | False(Def). Body code in field contains nested Macro. See example in Special Topics - Email.
NotifyReturn receipt email address. Same as using Disposition-Notification-To in name=Value.

QuickProp Keyword Abbreviation



See Special Topic - Email

See Also

z Class | Tornado Namespace | dbMail | dbUpload | Special Topic - Email