Previous Topic  Next Topic 



This section documents each NetMailBot parameter individually and gives full details of how to use them, with an example for each.


Elements of Each Entry


Each entry contains the following elements. See below for a description of each.




A categorization of the parameters, such as "Addressing", "Attachments", etc., to help you remember where a parameter applies as you get familiar with NetMailBot and for reference later.




A brief description of what the parameter does and its purpose.




Indicates (Yes or No) whether the parameter is optional.




This lists any parameters whose effects are rendered null by adding this parameter.


Overridden By:


This lists any parameters that make this parameter have no effect.


Other Parameters Required:


Many parameters can only be used in the context of using other parameters. In these cases, the other required parameters are listed here.


See Also:


Links to the other parameters of interest related to this parameter.




This is a brief syntactic description of how to use the parameter. The parameter is shown verbatim, and placeholders are used to indicate what parameter specifiers are applied to this parameter.


Placeholders appear in angle brackets, < and >, and anything inside them (including the brackets) are replaced by an actual value in the context of use. For example, <filename> might be replaced by myfile.txt.


All other characters shown (or spaces) are required. For example, the usage of -attachment below shows that filenames are put in quotes and separated by spaces:


-attachment "<filename1>" "<filename2>" [...]


We use the symbol [...] to indicate "more of the same, optionally". This symbol is not typed when you use the parameter; it is just another kind of placeholder for the purposes of this documentation. Thus, a valid, concrete use of -attachment using more than two attachment filenames is:


-attachment "log.txt" "timestamps.txt" "current_status.xls" "daily_report.pdf"




This gives an example of using the parameter within a complete NetMailBot invocation.




Additional comments about the parameter are listed here.


Important: Paths in NetMailBot


As a general rule, all parameters that take filenames as sub-parameters can use either relative paths or fully qualified paths:


-attachment "log.txt"


(a relative path; the file log.txt must be in the same directory as the batch file) vs. a fully qualified path:


-attachment "c:\my directory\log files\log.txt"


However, in practice, it is best to use fully qualified paths whenever possible to prevent the possibility of referring to a file that cannot be found by NetMailBot.


Quoting Parameter Specifiers


Quotes around parameter specifiers are, in general, optional, e.g.:


-addrecipient ""






Quotes are, however, necessary if specifying a parameter such as:


-body "this is the body"


If we didn't use quotes:


-body this is the body


...then NetMailBot would think that the body is only "this" and "is" is a new parameter.


For consistency, you might choose to always use quotes.


In this chapter, in our coverage of the individual parameters, we have typically used quotes with those parameter specifiers that might be likely to contain spaces, such as paths (even in specific examples that don't contain spaces, e.g. "c:\tmp\myfile.txt"). For other parameter specifiers we have omitted the quotes.


Spaces and Commas


Spaces are used to delimit parameters and switches.


Some parameters (e.g. -addrecipient) can take a variable number of parameter specifiers. Most of these use spaces (e.g. -addrecipient) to separate the parameter specifiers; some use commas (e.g. -dsnservers). Such exceptions will be pointed out for each parameter to which they apply.


Additive Behavior


In general, parameters with similar function act additively.


For example, -bcc specifies directly on the command line one or more email addresses to be Blind Carbon Copied on the email, while -bcclist specifies this list indirectly (by pointing to a file that contains the list). If both parameters are used, then the total list of "Bcc:" recipients will be combination of those specified with -bcc and -bcclist.


Similarly, -addrecipient adds additional email addresses to the "To:" field of an outgoing email over and above what is originally specified with -to.


There is an exception: use of the database connectivity functions with -dbuseaddressee set to "to" will override whatever email address(es) you have specified in the -to parameter.