-body (-b)
Previous Topic  Next Topic 



Message Content




Plain text body of the message (enclose multiple words in quotes).










Overridden By:


-bodyfile (when -bodyfile points to an HTML file on a website)


Other Parameters Required:


-to -from -server


See Also:


-bodyfile -htmlbody




-body "<single line plain text>"


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


NetMailBot -body "This is the body of the email. Use this parameter for short messages. Make sure to enclose multiple words with spaces in quotes." -to email@domain.com -from email@domain.com -server mail.domain.com -subject "test" 




The intention is to use either -body or -bodyfile. However, -body acts additively with -bodyfile, so you could use both together, but the contents of the specified body file will be appended to whatever is specified in -body. Suppose the two parameters are used together in a NetMailBot invocation as:


... -body "Here is an inline message body" -bodyfile "C:\bodyfile.txt" ...


Suppose the content of bodyfile.txt is simply "One line in a bodyfile". Then the message will be received with the following body:


"Here is an inline message bodyOne line in a bodyfile"


However, this does not apply if -bodyfile references an HTML file on a website (-bodyfile "http://www.something.com"). In this case, only the HTML file will be included as the message body.


If -bodyfile refers to a locally stored HTML file, the body will consist of the text from -body followed by the HTML file, but the results may appear strange.


Therefore, we recommend using -body or -bodyfile, but not both at the same time.