1
votes

I am creating a batch file in rails that is used to launch an email in Lotus Notes (8.5) with selected attachments. I want to be able to include a list of the files attached and some text in the body. I cannot find a way to either format the body as rich text or include some basic formatting such as new lines.

"C:\Program Files (x86)\IBM\Lotus\Notes\notes.exe" 
"Mailto:?Attach=\\CCTWEB\wwwroot  
\development\technical_library\public
\images\38\CCT_credit_application_05-2013.pdf
?body=file1.pdf & nl file2.pdf"

The batch file works. When the user clicks on it, it launches a lotus notes email with the proper attachments. What I can't get to work is to control the formatting in ?body=file1.pdf & nl file2.pdf (the & nl was just one attempt to create a new line). It seems that any formatting I attempt simply truncates the body at that point.

Is there any command line option for ?body= that would allow for RTF or HTML or is there a command I can insert to at least cause a new line?

1

1 Answers

1
votes

I found that I could do this by escaping the % in the batch file with a %.

The code that has to go in to the ?body= to cause a line feed in a notes email when passed from the command line is %0D%0A. However, the batch file interprets the %0 as 'the first parameter passed to the batch file'. The way around this is to use the following.

?body=file1.pdf %%0D%%0A file2.pdf %%0D%%0A"

That works and creates the batch file that can kick off a lotus notes email with the new lines that I want.