Internet access

The 1C:Enterprise language contains a set of objects allowing the data exchange over HTTP (HTTPS) and FTP (FTPS, FTPES).

HTTP (HTTPS)

The 1C:Enteprise language supports the data exchange over HTTP (HTTPS). With that, a developer can do the following:

  • establish an HTTP connection

  • write, get, or delete a file

  • send a resource to a specified address for processing

  • determine parameters of an established connection

  • activate any HTTP method

  • send headers to or get headers from the server

  • send a file, string (with automatic recoding into the appropriate encoding), or binary data as the query body

  • use Basic authorization

  • use operating system authentication (Negotiate/NTLM/Kerberos)

  • check the server certificate using the operating system's standard mechanisms or certificate file

  • send the client certificate to the server

  • use TLS 1.0 — TLS 1.2 to establish a secure connection

  • establish an HTTPS connection with the server employing certificates and encryption as per the algorithms prescribed in GOST 34.10-2012.

FTP (FTPS)

The 1C:Enterprise language supports the data exchange over FTP (FTPS, FTPES). With that, the developer can do the following:   

  • determine the active or passive FTP connection mode

  • set up the connection host (user), port of the connected server, and proxy server

  • write (finds) files of FTPFile objects

  • rename files and directories on the server

  • get a resource from the specified address

  • create (delete) a catalog on the server

  • set the current catalog on the server

  • determine the file size (in bytes)

  • determine parameters of files and directories

  • use TLS 1.0 — TLS 1.2 to establish a secure connection

  • check the server certificate using the operating system's standard mechanisms or certificate file

The 1C:Enterprise language allows describing proxy server parameters for various protocols. Protocols supported by the InternetProxy object are set by strings http, https, ftp, ftps. The developer can do the following:

  • set the user login and password to access the proxy server

  • get the proxy server port by protocol name

  • get the proxy server by protocol name

  • set proxy server parameters for various protocols

 

Using email

The developer can handle emails right from the 1C:Enterprise language. The developer can send and receive emails.

1C:Enterprise 8 supports two mechanisms of using email: through an email client installed on the computer, or without a third-party email client.

Internet Email (no client)

The internet email mechanism helps establish the exchange of emails between recipients, without the use of an email client. For that, the 1C:Enterprise language has a type titled InternetEmail. Its description is located in General Objects — Email — InternetEmail.

As the object set of this mechanism is versatile, it helps handle various commercial activity-related tasks dealing with the data exchange. Such tasks include the data exchange with enterprise customers, sending press releases to media, commercial data exchange with counterparties, etc. Transmitting data in various formats (text, HTML, graphics, binary data, etc.) dramatically catalyzes the tackling of those tasks.

The email mechanism is anchored by commonly-recognized SMTP and POP3 protocols that allow employing widespread email infrastructures. For end users, the availability of well-known standards facilitates getting their hands in the application.

Internet email mechanisms lets:

  • connect to a mail server by specifying addresses and parameters of IMAP, POP3, and SMTP

  • use a secure connection (SSL/TLS and STARTTLS)

  • disconnected from a mail server

  • send emails, also with the pre-send text processing

  • select emails on the mail server or delete them

  • delete emails from the mail server

  • create new emails

  • specify the email sender, recipients, copies, subject, body, and attachment list

  • use various email text types: HTML, plain text, and Rich Text

  • use binary data or other emails as attachments

  • set the encoding of the entire email or specific items

  • receive only email headers

  • get source texts of emails (for creating fully-fledged email clients)

Mail (requires a client)

The system supports the interaction with a client installed on a computer. For that, the 1C:Enterprise language has a type titled Mail. Its description is located in General Objects — Email — Mail.

It allows creating, sending, and receiving emails. Messages can have several recipients and attachments. The user can add (edit, delete) addresses of the pair (user—server) or full email addresses, manage attachments, etc.

Access to the email client installed on a computer lets the user:

  • connect to or disconnect from a mail server

  • send confirm-upon-receipt emails

  • pick unread emails from the mail server

  • create new servers

  • specify the email sender, recipients, copies, subject, body, and attachment list

Next page: Text files

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.