Absrtact: This paper briefly expounds the principle of sending e-mail, proposes a method based on C + + Builder and Access2000 database to carry out the mass mailing, and introduces the use of TIDSMTP components in C + + Builder in detail. and gives the core sample code that uses TIDSMTP component to realize mass.
Keywords: email mass; tidsmtp;tidmessage;ado
Introduction
Mail mass This means is widely used in E-commerce, network marketing, For example, we now have access to information on current books through the Shi mass mailing of chnia-pub.com (Interactive publishing Network), where more than 70% of Internet users in the United States are credited with email marketing for their online shopping activities, and those who build local area networks can send notifications or convey messages via mass mailing. , this can save a lot of manpower and material resources and convenient quickly. This paper introduces the principle of sending e-mail, puts forward a method based on C++builder and Access2000 database, and introduces the use of TIDSMTP component in C++builder in detail. and gives the core sample code that uses TIDSMTP component to realize mass.
The principle of sending e-mail
1. SMTP protocol
The SMTP protocol is a member of the standard protocol group on e-mail systems developed by the IETF (Internet Engineering Task Force) to achieve effective (efficiently) and reliable (reliably) message transfer. Mainly on how to send the e-mail from the sender address to the recipient address, that is, the rules of transmission regulations. The primary role in the SMTP protocol is the SMTP sender and SMTP transceiver, but an SMTP server may have two roles. The SMTP protocol uses a simple set of commands to establish a connection and transfer commands and data between hosts. The SMTP transmitter issues SMTP commands to the SMTP Inbox, such as: "MAIL from: <mybox@hunau.net>" is to tell the SMTP recipient the source of the mail, when a command is received, the SMTP recipient responds to the answering SMTP command, which returns an answer code, typically a three-bit decimal number, and each number has a specific meaning, such as returning "250" to indicate that the requested message operation is complete. Other SMTP commands and answer codes are described in detail in the RFC821 and are not discussed here.
2, ESMTP Agreement
At present, in order to prevent the proliferation of spam on the network, almost all mail service providers in the original SMTP server to append the authentication function, but in fact, the SMTP protocol itself does not have the authentication function, in March 1999 the introduction of the SMTP Service Authentication feature extension (SMTP services Extension for authentication,rfc2544), that is, ESMTP defines how to establish an authentication mechanism between the SMTP client and the server to perform the exchange of authentication protocols, while the extension also negotiates the security layer for subsequent protocol interactions. This extension is an aspect of the simple authentication and security layer (simply authentication and LAYER,SASL).
The expansion of the SMTP authentication function actually is to increase the auth command, the auth of the authentication method of the main command has login, CRAM-MD5 and plain and so on, our country at present use more is login way attestation. SMTP authentication is usually done before sending a message, using the password-answer (Challenge-response) way, that is, the server sent commands to ask the client to answer, the client according to the server to send information to answer, if the answer passed, then the certification success, you can continue the next step.
Using C++builder to realize mass mailing
1. Overall design
To achieve mass mailing, we first need to implement a connection to the SMTP server before sending mail through the SMTP server, because the SMTP server may require authentication so we have to write a useful mass-mailing software that must also have the capability of SMTP authentication. We can implement authentication, connection and mail delivery with the SMTP server through the TIDSMTP component in C++builder. By writing code to iterate through the mailing address list (mail list) and send messages to achieve mass. Given the convenience of managing and obtaining e-mail addresses, the security of address list stores and the development of other related applications based on this mailing address list we can use the Access2000 database to store mailing lists, using C + + Tadotable components in Builder we can use ADO to easily achieve direct access to the ACCESS2000 database and various operations.