Introduction: When to Use Different Delimiters
Previous Topic  Next Topic 

Delimiters and Syntactic Interference


The -dbreplacementids parameter specifies the replacement identifiers to be used with -personalize. The format of the parameter's specifiers is:


-dbreplacementids "<delimiter><first id name><delimiter>=<first column name>, <delimiter><second id name><delimiter>=<second column name> [...]"


The most common example delimiters used are << and >>, thus you will see lots of examples in .bat files like:


-dbreplacementids "<<date>>=date,<<name>>=name"


Sometimes the chosen delimiters can cause problems, mainly because they have another meaning in the "medium" into which they are being expanded. Fortunately, NetMailBot allows you to use any delimiters you like.


<< and >> and HTML Message Body Problems


The most common known conflict is use of << and >> as delimiters when the replacement IDs  are in HTML message bodies, because HTML uses < and > as tag delimiters. In this case, try any other alternative, such as $ or @, in your .bat file:


-dbreplacementids "$firstname$=first_name,$lastname$=last_name"


...and in your HTML body file:


<p>Dear $firstname$ $lastname$</p>


You can use any delimiting characters you like: [[ ]], [ ], $ $, @ @, etc. You can even mix different delimiters within the same replacement ID set, although this is probably unnecessary. For example:


-dbreplacementids "$first_name$=first_name,#last_name#=last_name"

Then in an HTML message body:
<html><body><font face="arial">Dear $first_name$ #last_name#, thank you for contacting us.</font></body></html>


When having problems with replacement ID expansion, consider whether the delimiters you're using might be causing problems in the message body.