### Publishing to e-mail properties

When scheduling reports via URL, the publishing to e-mail properties are as follows:

- jrs.jrmail + NUMBER
  Constant: jet.cs.util.APIConst.TAG_JRMAIL + NUMBER
  Description: Contains specifications (JReport mail properties) of one send-mail task for a report.
  Example: `jrs.jrmail0=jrs.mailsubject%3dreport%2520Employee Information%26jrs.mailformat%3d0%26jrs.mailto%3dreader1%26jrs.jrmail1=jrs.mailsubject%3dreport%2520Employee Information%26jrs.mailformat%3d4%26jrs.mailto%3dreader2%252c%2520reader3%26`
- jrs.csmail + NUMBER
  Constant: jet.cs.util.APIConst.TAG_NORMAL_MAIL + NUMBER
  Description: Contains specifications (JReport mail properties) of one send-mail task for sending an e-mail with or without an attachment. This property is used via URL or via invoking Server API.
  Example: `jrs.csmail0=jrs.mailcomments%3dto%2520user1.%26jrs.mailsubject%3dtest%2520sending%2520normal%2520emails%2520without%2520report%26jrs.mailto%3dtim%40support.jinfonet.com&jrs.mailattach1%3dd%3a%5ctest1.txt&jrs.mailattach0%3dd%3a%5ctest0.txtjrs.csmail1=jrs.mailcomments%3dto%2520user2.%26jrs.mailsubject%3dtest%2520sending%2520normal%2520emails%2520without%2520report%26jrs.mailto%3dhelen%40support.jinfonet.com%26jrs.mailattach1%3dd%3a%5ctest2.txt%26jrs.mailattach0%3dd%3a%5ctest3.txt`

#### Properties in jrs.jrmail

- jrs.mailto
  Constant: jet.cs.util.APIConst.TAG_MAIL_TO
  Description: Specifies the mail address.
- jrs.mailcc
  Constant: jet.cs.util.APIConst.TAG_MAIL_CC
  Description: Specifies the mail address to be carbon copied to.
- jrs.mailbcc
  Constant: jet.cs.util.APIConst.TAG_MAIL_BCC
  Description: Specifies the mail address to be blind carbon copied to.
- jrs.mailsubject
  Constant: jet.cs.util.APIConst.TAG_MAIL_SUBJECT
  Description: Specifies the "SUBJECT" of the e-mail.
- jrs.mailcomments
  Constant: jet.cs.util.APIConst.TAG_MAIL_COMMENT
  Description: Specifies the "COMMENTS" field of the e-mail.
- jrs.mailformat
  Constant: jet.cs.util.APIConst.TAG_MAIL_FORMAT
  Description: Specifies the mail format.
  Possible values: {0, 1, 2, 3, 4, 6, 7, 8, 9, 11}. The default value is 0.
  - 0 - E-mail Result in HTML E-mail Format
  - 1 - E-mail Result in Plain Text E-mail Format
  - 2 - Attachment in HTML Format
  - 3 - Attachment in PDF Format
  - 4 - Attachment in JReport Result Format
  - 6 - Attachment in PostScript Format
  - 7 - Attachment in Excel Format
  - 8 - Attachment in RTF Format
  - 9 - Attachment in XML Format
  - 11 - Attachment in Text Format
- jrs.mailcompress
  Constant: jet.cs.util.APIConst.TAG_MAIL_COMPRESS
  Description: Specifies whether to enable Java archive compress.
  Possible values: {true, false}. The default is false.
- jrs.udchar_width
  Constant: jet.cs.util.APIConst.TAG_CHAR_WIDTH
  Description: Specifies the user defined character width. It has no effect if the value is 0 or less than 0 (for TEXT format).
- jrs.udchar_height
  Constant: jet.cs.util.APIConst.TAG_CHAR_HEIGHT
  Description: Specifies the user defined character height. It has no effect if the value is 0 or less than 0 (for TEXT format).
- jrs.no_margin_mail
  Constant: jet.cs.util.APIConst.TAG_NO_MARGIN_MAIL
  Description: Specifies that there are no margins for the report in the e-mail.
  Possible values: {true, false}. The default is false.
- jrs.use_table_mail
  Constant: jet.cs.util.APIConst.TAG_USE_TABLE_MAIL
  Description: Specifies to use the HTML table to generate an HTML format e-mail.
  Possible values: {true, false}. The default is false, which means to generate the HTML table.
- jrs.mailattach + NUMBER
  Constant: jet.cs.util.APIConst.TAG_MAIL_ATTACH
  Description: Specifies the attached file for this mail. You can attach multiple files with one mail.
  Possible values: The attached file name
  Example: `jrs.mailattach0=d%3a%5ctest1.txt (where "d%3a%5ctest1.txt" is the URL-encoded string of "d:\test1.txt")`
- jrs.mailencoding
  Constant: jet.cs.util.APIConst.TAG_MAIL_ENCODING
  Description: Specifies the encoding of the mails.
  Possible values: UTF-8, UTF-16, ISO8859-1 and so on.

  Note: jrs.mailencoding is used to specify the mail encoding in the URL. When sending mails by RMI API, sometimes, wrong characters may be returned in the mail. In order to avoid such problems, specify the same correct value of -Djreport.url.encoding on both the server and RMI client side.

  For example, your web application calls JReport Server (standalone) via the RMI function from WebSphere, and UTF-8 (use UTF-8 rather than UTF8) will be used as the mail encoding, do as follows:
  - Specify -Djreport.url.encoding=UTF-8 for both JVM running JReport Server and WebSphere.
  - Specify jrs.mailencoding=UTF-8.

#### Example

`http://localhost:8888/jinfonet/submitSchedPage.jsp?jrs.cmd=jrs.submit_schedule&jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/CustomerAnalysis.cls&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007&jrs.task_class=jet.server.schedule.jrtasks.SendMailTask&jrs.to_mail=true&jrs.csmail0=jrs.mailto%3dxxx@jinfonet.com%26jrs.mailcomments%3dtouser1.%26jrs.mailsubject%3dreportkkkk%26jrs.mailattach0%3dd%3a%5ctemp%5ctest1.txt%26jrs.mailattach1%3dd%3a%5ctemp%5ctest2.txt`