3.2.4.2.34.9 MailTo (put) (Opnum 19)

The MailTo (put) method sets the email address recipient list to which the reports will be emailed when the report job is successfully completed. The format of the email address needs to be as specified in [RFC5322].

 [propput, id(FSRM_PROPERTY(FSRM_DISPID_REPORT_JOB | 0x04))] HRESULT MailTo(
   [in] BSTR mailTo
 );

mailTo: Contains the email address recipient list to which the reports will be emailed when the report job is generated. The string in mailTo MUST be in the form of a mailTo string (section 3.2.4.2). The maximum length of this string MUST be 255 characters.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The list of addresses in the mailTo parameter is too long. The maxiumum length of each address is 255 characters.

  • The mailTo parameter is not a valid value; one or more of the addresses are not formatted correctly. The format of the email address needs to be as specified in [RFC5322].

Upon receiving this message, the server MUST validate parameters:

  • Verify that each email address in mailTo is less than 256 characters.

  • Verify that all email addresses in mailTo are formatted correctly.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

The server MUST set the Report Job.Mail to on the report job object.

If mailTo contains the string "[ADMIN EMAIL]" the server MUST store that string instead of replacing it with the Administrator email address setting (section 3.2.1.9).