Sending Email with an SMTP Client Built with Prototype and PHP
(Page 1 of 4 )
If you're a web developer who wants to acquire a solid background in building applications with the popular Prototype JavaScript library, then this set of articles may be what you're looking for. Welcome to the last installment of the series that began with "Building an SMTP Client with Prototype." Made up of three friendly tutorials, this series teaches you how to use this powerful software package to create a highly expansible email application that works with most modern browsers.
Introduction
Going back for a moment to the second article of the series, quite possibly you'll recall that building this SMTP client using the functionality provided by Prototype can be tackled with minor problems. Since the library comes packaged with many useful features, like the neat "AJAX.Updater" class and the $ and $F functions, it's possible to create AJAX-based applications, like the one discussed here with extreme ease.
This fact was clearly demonstrated in the previous tutorial, where I showed you how to turn the corresponding user interface of the SMTP client into a fully-functional front-end by defining a few simple JavaScript functions for sending HTTP requests via the "AJAX.Updater" class and assigning the appropriate behaviors to each form control included in the graphical interface.
However, even with the SMTP application near completion, you'll certainly remember that there was one missing piece in this schema. So what was it? Well, to be frank, the SMTP client needs to interact with a PHP file on the web server, which is the component that actually sends an email message, using the different parameters entered by the user.
Therefore, in this final part of the series I'm going to complete this email application by creating a simple yet efficient PHP script, which will be responsible for sending email messages to the recipients specified by the user.
The experience sounds really instructive and why not, enjoyable too, so let's not waste more time in preliminaries and begin now!
Next: The complete client-side code of the SMTP application >>
More JavaScript Articles
More By Alejandro Gervasio