4D Internet Commands v16Sending Mail, Overview |
||
|
4D Internet Commands v16
Sending Mail, Overview
Sending Mail, Overview
Simple Mail Transport Protocol (SMTP) is the mail standard used throughout the Internet. With 4D Internet Commands, developers can build simple mail messages with just one command, or complex messages with a series of commands. The SMTP commands enable developers to control all portions of a mail message, including Reply-To headers, Sender headers, Attachments, Comments, and References. 4D and 4D Internet Commands allow developers to create very powerful databases with the ability to send messages and attachments over the Internet. Some examples of how the suite of SMTP commands could enhance your databases are:
There are an unlimited number of uses for the suite of SMTP commands. These commands, combined with those for POP3 (retrieving both files and attachments), FTP, and TCP provide the 4D developer with the tools to dramatically increase the communications capabilities of their 4D databases. Within the SMTP section of commands, there are two separate methods of sending electronic mail, which have previously been referred to as "simple" and "complex". The "simple" method involves a single command, SMTP_QuickSend, which accepts all the parameters necessary to address and send a message. The majority of e-mail sent throughout the world is pretty simple in its construction; somebody "here" wants to send a "message" of some kind to somebody "there" regarding some "subject". If this were a paper letter, you would write everything up, seal and address the envelope and then take it to the post office for delivery. With SMTP_QuickSend, you can specify the "From", "To", "Subject" and "Message Body" within one command for easy e-mail delivery. However, not all mail delivery can fit into such narrow parameters. For instance, suppose the letter above needed copies sent to other interested parties or perhaps an attachment such as your Annual Report needed to be enclosed. In these cases, photocopies of your letter would be made and reports printed as your staff collated the material and addressed the envelopes to each recipient. The SMTP commands in 4D Internet Commands simplify the electronic distribution by giving you control over all aspects of e-mail delivery. Multiple attachments, Carbon Copy & Blind Carbon Copy addressing, any mail header specification can be handled through the Built Message capabilities of the SMTP commands. One of the critical concepts in understanding the SMTP commands relates to the method in which mail is delivered to its recipients. The SMTP commands do not directly deliver the mail to each recipient. The commands handle the proper composition and formatting of your mail and will deliver the results to the SMTP server specified by the SMTP_Host command. The SMTP server is often a machine within your own organization or at your Internet service provider. The SMTP server then resolves the optimum delivery path for your mail and schedules its distribution based on settings configured by the mail administrator. In order to successfully deliver a mail message built using the SMTP commands, the essential commands must all be correctly defined. The following commands represent the minimum in order for e-mail delivery to be successful:
If only the commands listed above were executed, a message would have been sent which contained no "Subject" definition and no message body. This isn't particularly useful and illustrates the need to specify additional detail in order to effectively communicate your message. Starting with 4D v14, the "subject" and "body" fields of SMTP commands use the UTF-8 character set by default. This character set will be interpreted correctly by almost all of the e-mail clients. This functioning greatly simplifies the use of SMTP commands and now limits the usefulness of the SMTP_Charset and SMTP_SetPrefs commands.
|
PROPERTIES
Product: 4D Internet Commands
HISTORY
ARTICLE USAGE
4D Internet Commands ( 4D Internet Commands v16) |