Site Map Contact Us Home
E-mail Newsletter
Subscribe to get informed about
Clever Components news.

Your Name:
Your Email:
 
SUBSCRIBE
 
Previous Newsletters
 




Products Articles Downloads Order Support
Customer Portal      

Clever Internet Suite Tutorials


Clever Internet Suite Tutorials


A new Delphi tutorial was added:
- SFTP Client with Host-key Repository.

Now, more than ten years on the market, the Clever Internet Suite got lots of feedback and usage experience. Our customers asked us about code examples, demos and "How To" code snippets. To summarize the experience, we decided to publish the most commonly asked examples and code snippets in our Knowledge Base.

This article represents a list of recently added examples with short comments and downloading links. This list will be periodically updated, new items will be added. Please stay tuned to new examples and use cases of the Clever Internet Suite library.

All example projects and code snippets are available on GitHub

C# / VB.NET Tutorials

 

Delphi / C++Builder Tutorials

  Name   Description
  SFTP Client with Host-key Repository This Delphi app implements a simple host key repository that keeps all known and verified by user SFTP host-keys and automatically accepts connections to these hosts.
 How to Override Default POP3 Server Command Handlers The program shows how to override the default POP3 command handlers and implement your own ones.
 How to Recompose Received MailMessage with Attachments The program represents a Delphi tutorial that utilizes the Clever Mail Message and S/MIME Message components to parse / compose E-mail messages in MIME format, with file or image attachments.
 Send Photo using Telegram API The program represents a Delphi tutorial that utilizes the Clever HTTP and HttpRequest components to submit an image to a Telegram channel using Telegram Bot API.
 Silent Socket Receiver in Delphi The tutorial represents a Delphi program that starts listening to an incoming connection, accepts the connection, receives all data over the established connection, and sends no data back to the client.
 MailSend with TMS FNC RichEditor The program represents a Delphi tutorial that utilizes the TMS FNC UI RichEditor and Clever SMTP components to compose and send HTML E-mails.
 Connect Bitstamp API from Delphi This program represents a converted C++ example, which is published in the Bitstamp API documentation. The example shows how to authenticate at the Bitstamp REST service, fill necessary request fields, and make an API call.
 How to modify a subject line of the email within the raw .eml source This tutorial loads an email message from an .eml file, parses the MIME message header, extracts and replaces the subject line, and finally, sends the message using the SMTP component.
 HttpServer - handling form-field requests This tutorial runs the HTTP server, accepts requests from connected users, and sends responses. If the request contains form-field data, the form fields are parsed and extracted.
 Download TS files from video stream The example shows how to download TS files from a video stream using the MultiDownloader component.
 Making and Extracting the content of a .p7m file How to create and extract the contents of a .p7m file, load a signing certificate from a .pfx file or Windows registry storage, verify the digital signature and extract certificates from a .p7m file.
 How to encode and decode data:URL images This example shows how to encode and decode data:URL images, which are embedded in HTML.
 HTTP Get using TTask This tutorial shows how to use the parallel threads provided by the TTask class in the Http.Get example.
 How to extract/add MIME headers in E-mail messages and HTTP requests This example describes how to use the TclHeaderFieldList class for extracting and composing MIME headers for Emails or HTTP.
 Send Signed Email This example shows how to sign an Email message using the S/MIME protocol, the NIST sha-512 algorithm, and X509 certificate.
 Send S/MIME Message This tutorial signs and encrypts an Email message in the S/MIME format using X509 certificates, and sends the protected message via the SMTP protocol.
 How to write a REST client with JSON in Delphi This tutorial represents a Delphi REST API Client with JSON. It makes a JSON request, which includes objects and object properties, sends this request to a Web service, and receives a JSON response. The example parses a received JSON response and extracts all included object properties.
 SFTP Client with User and Public Key Authorization This example connects to an SFTP host via the Secure Shell protocol (SSH), authorizes with the user/password or the Public Key algorithms, lists, downloads, and uploads files.
 POP3 Client The example represents a simple POP3 client, which can connect to a POP3 server, list available Emails within a mailbox, and download the selected message content. The program extracts MIME message parts, including text, HTML, and headers.
 Retrieve and Display HTML Mail via POP3 This tutorial represents a POP3 client, which downloads selected Email message from a POP3 mailbox, extracts MIME message parts, and displays the message content. If the message includes an HTML message part, this part is displayed using the TWebBrowser component. Otherwise, a text part is displayed.
 How to Build and Parse a JSON String with Objects The tutorial makes a JSON request, which includes objects and object properties. Also there is a code, which parses received JSON response and extracts all included object properties.
 Setting Up HTTP Proxy Parameters in TCP-based Client Components The tutorial shows how to set up proxy parameters in the TclDownloader, TclUploader, TclHttp, TclFtp, TclSmtp, and other TCP-based client components.
 How to create/parse SOAP MTOM/XOP, XML, and binary attachments The tutorial shows how to work with SOAP messages, containing MTOM/XOP, XML, or binary attachments.
 How to send a SOAP WSDL request The example demonstrates how to build a SOAP request, specify WSDL method and parameters, send this request to a WSDL service, and receive a response.
 How to send a GET request with JSON data This example provides three different ways to submit JSON GET requests, including raw JSON strings and RTTI JSON objects serialization/deserialization.
 Sending Mail with Attachments from Memory Stream A new Knowledge Base example of sending E-mail messages with attachments from Memory Stream.
 Adding text and attachments to the E-mail message Shows how to add text and attachments manually to the E-mail message.
 Signing and Encrypting Mail via S/MIME A Knowledge Base example of signing and encrypting the e-mail message with digital signature.
 VK Authorization, getting the OAUTH code in Delphi App using TWebBrowser The example demonstrates how to authorize at VK.com social Network and get access to the user's photo gallery.
 How to make the PUT HTTP request with JSON data Learn more on how to PUT JSON request, including an OAUTH authorization token, and get the server reply.
 Sign XML Documents with Digital Signatures This example demonstrates how to sign an XML document with digital signature by using of the SOAP Message component.
 How to Catch HTTP Error Response The example handles HTTP exceptions, gets the HTTP status code and downloads the HTTP server response.
 Setting Up SFTP Public Key Authorization The example demonstrates how to set up the SFTP Public Key Authorization for the SFTP Client component.
 Load and Associate a Private Key with the Public Certificate This Delphi example loads a private key from a file and associates it with the public certificate. Also, it includes a code snippet illustrating exporting of the private key from the certificate.
 Decode IMAP UTF7 mailbox names in Delphi This Delphi example decodes IMAP mailbox names that include Unicode international symbols being encoded in modified UTF-7 format (see RFC 2060).
 Read a fixed number of bytes from the socket using TcpClientConnection The example connects to a remote server, reads a fixed number of bytes from the socket, and after that reads the remaining bytes.
 Binding TcpClientConnection to the specified interface and port number This sample provides a special LocalBindingConnection class that connects to a remote server and binds to the specified local interface and port number.
 Receiving multiple requests using Simple HTTP Server The example starts listening the socket in a loop. Incoming requests are accepted until you request a specific URL in your web browser.
 Encrypt and Decrypt files on the disk   This sample cryptographically encrypts / decrypts files with digital x509 certificate.
 Send email with an Office365 account This sample connects to the smtp.office365.com host via the STARTTLS command, composes a sample mail message and sends it.
 Build DNS server response on the fly based on the name submitted This sample represents a DNS server that responds with an in-memory list of IPs based on the name submitted.
 Send mail with German Umlauts This sample demonstrates how to set up the TclMailMessage component correctly for transferring German Umlauts and other UTF-8 characters.
 Parse XML, elements, attributes The sample parses an XML document that is provided within Delphi string list, extracts all tags, tag attributes and included data.
 Get host ip address behind load balancer using proxy protocol The PROXY protocol provides a convenient way to safely transport connection information such as a client's address across multiple layers of NAT, TCP proxies or load balancers. The described code parses this information and removes the proxy header packet from the data stream. The example program utilizes the IMAP server component behind an Amazon load balancer (ELB).
 Check if PC is connected to the Internet Checks the Internet connected state and tries to access the specified web resource by using of the system connection settings: proxy, socks, etc.
 Get IE proxy settings for the Http client component This example sets up the System Proxy settings in the Http client component. The supported proxy types: Http, Https, and Socks.
 Convert RSA Public Key to X509 Subject Key Info format There are two simple functions that convert RSA Public Key format to X509 Subject Key Info format in base64 and PEM representation.
 How to use the Simple HTTP Server component in the blocking mode The Clever Internet Suite library provides the TclSimpleHttpServer component, which works in the single-threaded blocking mode.
 How to Post JSON data If you need to submit data in JSON format, you can use the following two components: TclHttp and TclHttpRequest.
 Console FTP client The program represents fully functional command-line FTP client.
 Copy TWebBrowser cookies to TclHttp The examples opens the TWebBrowser, navigates to a website, copies the website cookies to the TclHttp and finally runs the TclHttp downloading.
 Get the complete FTP directory tree The sample connects to an FTP server and gets the complete FTP directory tree recursively.
 Parse inner HTML The sample runs the TclHtmlParser component and extracts inner HTML from specific tags.
 Ping client The sample represents simple ICMP client with Ping functionality.
 Asynchronous HTTP download Download URLs asynchronously in multiple threads from thread pool.
 Asynchronous SSL client / server The client connects to the server via SSL and sends/receives data. The server accepts data from the client and also allows you to send non-requested data to connected clients.
 Check Internet connected state Retrieves the connected state of the local system.
 Custom TCP client / server TCP client and multi-threaded TCP server that allows to send/receive multiple text lines and also send/receive binary data. 
 E-mail replying / forwarding The sample can receive E-mail messages, forward or reply to selected message.
 Get CSP Information Gets an information about installed Cryptographyc Service Providers.
 Get IE proxy settings Get the default Internet Explorer proxy settings.
 HTML parser for Firemonkey The sample parses HTML tags by using of TclHtmlParser component in Firemonkey.
 Multithreaded Mail Sender Loads E-mails from a database and sends it asynchronously in a thread pool.
 Parse HTML table text This sample parses HTML source, extracts tables and displays table cell text.
 SSL client / server There are two programs that implement both simple TCP client and TCP server with SSL/TLS encryption.
 TCP client / server connection The client creates a connection and sends data. The server accepts data and returns it to the client.
 Wake up on LAN Allows a computer to be turned on or awakened by a network message.

 

C# / VB.NET Tutorials

  Name   Description
  Handling SEARCH UNDELETED SINCE in IMAP4 Server for C# .NET This is a sample IMAP server, which shows how to handle the SEARCH UNDELETED SINCE command in IMAP4 Server for C# .NET, You can use any mail client with IMAP support to connect to this server.
 How to write a Framed Messaging Server and Client in C# The tutorial shows how to write your own framed messaging server and client based on the basic TcpServer and TcpClient components.
 E-mail replying / forwarding This example shows how to download an Email message from a Pop3 mailbox, forward or reply to this Email using the Smtp component from the Clever Internet VCL Suite library.
 How to write a Windows SMTP Service in C# The example shows how to write a multi-threaded SMTP server in C#, which runs in a Windows service, listens to incoming connections, accepts incoming mail, and relays mail to external recipients.
 Ping client in .NET The sample represents simple ICMP client for C# .NET with Ping functionality.
 Send SMTP email with Office365 account This example connects to the smtp.office365.com host via the SMTP protocol, authorizes using the STARTTLS command, composes a new message, and sends it.
 Setting Up HTTP Proxy Parameters in TCP-based Client Components All these components provide two special properties for both HTTP and FTP hosts: HttpProxySettings and FtpProxySettings, correspondingly.
 Parse HTML table text The sample represents simple ICMP client for C# .NET with Ping functionality.
 Parse inner HTML The sample runs the TclHtmlParser component and extracts inner HTML from specific tags.
 Get the complete FTP directory tree. The sample connects to a FTP server and gets the complete FTP directory tree recursively.
 FtpClient for .NET The example represents a C# .NET FTP client, which can log in to an FTP server, browse remote directories, download remote files, and upload local files to a selected FTP directory.
 Convert RSA Public Key format to X509 Subject Key Info format The example represents two simple functions, which convert the RSA Public Key format to the X509 Subject Key Info format in base64 and PEM representation.
 Decode IMAP UTF7 mailbox names in C# This C# example decodes IMAP mailbox names, which include Unicode international symbols, encoded in modified UTF-7 format (see RFC 2060).
 Read a fixed number of bytes from the socket using TcpClientConnection in C# The example connects to a remote server, reads a fixed number of bytes from the socket, and after that reads the remaining bytes.
 Receiving multiple requests using Simple HTTP Server in .NET The example starts listening the socket in a loop. Incoming requests are accepted until you request a specific URL in your web browser.
 Sending Emails using GMail in C# This sample connects to a GMail mailbox via the SMTP protocol, composes a sample mail message and sends it.
 Reading Emails using GMail in C# The sample connects to a GMail mailbox via the IMAP4 protocol, lists folders and reads Emails.
 OAuth Authorization using GMail in C# The example connects to a Google Account via the OAUTH protocol, obtains an authorization token and uses it for sending Email.
 Display HTML mail The sample retrieves a POP3 email message and displays the HTML content in a WebBrowser class.
 Console HTTP client Is a simple HTTP client that allows you to download text or HTML content and output it to the console window.
 Custom TCP client / server The example represents a fully functional TCP client and a multi-threaded TCP server.
 Enumerate Network adapters Gets the IP addresses of Network interfaces on multi-homed PC.
 Mail Sending Queue The example watches the specified directory for new mail messages, loads, and relays them to recipients.
 TCP client /server connection There are two examples. The client creates a connection and sends data. The server accepts data and returns it to the client.
 Wake up on LAN for C# Allows a computer to be turned on or awakened by a network message.

 

Best regards,
Clever Components team
www.clevercomponents.com

    Copyright © 2000-2024