Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ON PROJECT
“MAIL SERVER”
IN PHP MYSQL
COMPUTER ENGINEERING
(Session: 2008-2012)
Introduction:
For example, if you are creating an online catalog, you will most likely have a design
template for all related catalog pages. Traditionally, this design is generated by hand in
HTML and different data is presented within the template design. With PHP, one
application can be used to generate all the pages required to display items from a
database in the proper pages, in the right locations, and with the appropriate related
content. This eliminates redundant page generation, simplifying maintenance. PHP also
reduces the site down to a handful of template pages, with scripts that generate the rest
of the site.
If you are a content developer, you probably won’t want to learn PHP scripting by heart.
But, it is nice to know how PHP can help you create more powerful web applications
and user-friendly designs.
PHP Characteristics:
As you may have realized, the PHP language revolves around the central
theme of practicality. PHP is about providing the programmer with the necessary tools
to get the job done in a quick and efficient fashion. Five important characteristics make
PHP’s practical nature possible:
• Familiarity
• Simplicity
• Efficiency
• Security
• Flexibility
Familiarity
Programmers from many backgrounds will find themselves already accustomed to the
PHP language. Many of the language’s constructs are borrowed from C and Perl, and in
many cases PHP code is almost indistinguishable from that found in the typical C or
Pascal program. This minimizes the learning curve considerably.
Simplicity
A PHP script can consist of 10,000 lines or one line: whatever you need to get the job
done. There is no need to include libraries, special compilation directives, or anything of
the sort. The PHP engine simply begins executing the code after the first escape
sequence (). If the code is syntactically correct, it will be executed exactly as it is
displayed.
Efficiency
Security
PHP provides developers and administrators with a flexible and efficient set of security
safeguards. These safeguards can be divided into two frames of reference: system level
and application level.
Several trusted data encryption options are supported in PHP’s predefined function set.
PHP is also compatible with many third-party applications, allowing for easy-integration
with secure ecommerce technologies. Another advantage is that the PHP source code
is not viewable through the browser because the script is completely parsed before it is
sent back to the requesting user. This benefit of PHP’s server-side architecture prevents
the loss of creative scripts to users at least knowledgeable enough to execute a ‘View
Source’.
In order to send mail, the mail server software uses SMTP, or Simple Mail Transfer
Protocol. Here is how SMTP works:
The mail client, which is the software used to compose the e-mail (like Outlook
Express), will send the mail to the mail server that is configured in the mail client
software package. The mail server’s address can be found under the SMTP
server configuration.
The SMTP server will analyze the “To”, “CC”, and “BCC” addresses to determine
which server or servers the e-mail is supposed to go.
Finally, the SMTP server will send the e-mail to the destination mail server or
servers.
Because of the latest trend of “spam” (unwanted e-mail), some SMTP servers are
becoming more sophisticated. Some SMTP servers are analyzing the “From” address to
make sure that the e-mail address is a legitimate address for that domain before sending
the e-mail.
In order to receive mail, the mail server software will use either POP3 - Post Office
Protocol 3, or IMAP - Internet Message Access Protocol. Here is how POP3 works:
The POP3 server will receive the e-mail from an SMTP server.
The POP3 server will analyze the “To”, “CC”, and “BCC” addresses to determine
where it is supposed to go.
The POP3 server will send the mail to the “inbox” for that address (if the e-mail
address is a legitimate address for that domain). If the address is not a legitimate
address for that domain, the POP3 server will send an error message back to the
SMTP server.
When the user opens his/her mail client (like Outlook Express), the software
package will check the POP3 server for new mail. The mail server’s address can
be found under the POP3 server configuration.
IMAP is a newer protocol used for receiving e-mail, and a number of mail server
software packages are using this protocol rather than POP3 to receive mail.
A newer function of some mail server packages is Mail Filtering. These are mail servers
act as “spam detectors”. A “spam detector” analyzes the incoming mail and determines
whether the mail is “spam” (junk e-mail) or not. The factors to determine whether the
mail is “spam” can vary based on the package. Some common factors used are:
keywords, the domain from which the mail originated, and letter combinations.