EmailFilesFromFileServerAsAttachment method (WinStudio scripts)
Applies to
FileServerExtension IDO
Description
Sends email as attachment from file server.
Syntax
Application.FileServer.EmailFilesFromFileServerAsAttachment(out
string1,string2,string3,string4,string5,string6,string7,string8,string9,string10,string11,Boolean1,Boolean2)
where:
Part | Description |
---|---|
string1 | Required. The name of the translatable string that contains the error message for the method. |
string2 | Required. The name of the file server to be used. |
string3 | Required. The name of the logical folder to be used. |
string4 | Required. The path to the file. For a single file pass, you can include the file name along with the file path. |
string5 | Optional. Alternative names for a file pass, separated by commas, or pipe symbol (|). |
string6 | Required. Email addresses of all intended primary (To:) recipients must be separated by semi-colons (;). |
string7 | Optional. Text for the Subject field of the generated email. |
string8 | Optional. Text for the Body field of the generated email. |
string9 | Optional. Email addresses for any intended secondary (Cc:) recipients. Multiple recipients must be separated by semi-colons (;). |
string10 | Optional. Email address for any intended "blind" secondary (Bcc:) recipients. Multiple recipients must be separated by semi-colons (;). |
string11 | Optional. Email addresses for "Reply to:" recipients. Multiple recipients must be separated by semi-colons (;). |
Boolean1 | Optional. True specifies that the email is to be formatted as HTML. False specifies that the email is to be formatted as plain text. |
Boolean2 | Optional. True specifies that the email includes an attachment. False specifies that there is no attachment. |
Remarks
This method is invoked by the Call Method event action type (AES).
Example
public void EmailFileScript()
{
var fileName = ThisForm.Components["FileNamesListEdit"].Text.Split('.').ToList();
string errorMessage;
Application.FileServer.EmailFilesFromFileServerAsAttachment(
out errorMessage,
ThisForm.Components["ServerNameEdit"].Text,
ThisForm.Components["SelectLogicalFolderCombo"].Text,
ThisForm.Components["FileSpecJSON"].Text,
ThisForm.Components["FileNamesListEdit"].Text.Split(',').ToList(),
ThisForm.Components["ToEmailListEdit"].Text,
ThisForm.Components["SubjectEdit"].Text,
ThisForm.Components["BodyEdit"].Text,
ThisForm.Components["CCEmailListEdit"].Text,
ThisForm.Components["BCCEmailListEdit"].Text,
ThisForm.Components["FromEmailListEdit"].Text,
ThisForm.Components["HtmlFormatFlagEdit"].Text == "1",
ThisForm.Components["EmbeddedEdit"].Text == "1",
);
ThisForm.Components["InfoBarEdit"].Text = errorMessage;
}