-htmlbody (-html)
Previous Topic  Next Topic 



Message Content




If specified, the message body's MIME type is set to be TEXT/HTML. Use in conjunction with -body to force NetMailBot to override the default MIME type of TEXT/PLAIN.


This parameter essentially enables inline HTML. That is, the -body parameter is usually specified with plain text, but with -htmlbody you can put HTML tags in the -body parameter and the client will display it as HTML. See the example.


The alternative (and more common) option is to use -bodyfile to refer to an HTML file.










Overridden By:




Other Parameters Required:


-to -from -server (-bodyfile or -body)


See Also:








Example (cut-and-paste right into your batch file):


NetMailBot -htmlbody -body "<h1>Use the -htmlbody parameter to force NetMailBot to set the MIME type for the message body to TEXT/HTML.</h1>" -to email@domain.com -from email@domain.com -server mail.domain.com -subject "test" 




NetMailBot always does some basic detection of HTML message bodies in the -body parameter; if NetMailBot finds <html> or <body> within the -body parameter text, then it assumes that the content is to be interpreted and displayed as HTML.


If you are using simpler HTML tags, such as the heading tags in the above example, and do not include <html> or <body>, then using -htmlbody forces NetMailBot to interpret the content as HMTL.


The intention is to use either -body (possibly with -htmlbody as above) or -bodyfile, but not both at once (which would be unusual anyway). Using both at once may yield strange results.