This tutorial describes how to use PHPMailer-FVE. At its core is one single file to validate and process (email or store to database) your form. The only requirement is that you add a recipient email to get the form data. There are three (optional) ways to use PHPMailer-FVE:

  • Validate forms
  • Email forms
  • Validate, then Email forms

Contents

  1. PHPMailer-FVE
    What is it? What does it do? Who needs it?
    Brief examples of PHPMailer-FVE features.
  2. Single File Use
    How to use PHPMailer-FVE (by itself) to process your forms.
  3. Using PHPMailer-FVE Extras
    Sending mails with file attachments: filesystem, database or inline.
  4. What are Plugins?
    How to use the Plugins architecture for post-processing your forms data.
  5. Support: Where do I get help?
    How to find support resources: PHPMailer-FVE website, etc.

PHPMailer-FVE

PHPMailer-FVE maybe a new project, but it has been around for years as two separate projects. PHPMailer-FVE is the merger of FormValidator and PHPMailer-FE. PHPMailer-FVE can validate your forms and email them from one single source project file.

PHPMailer-FVE is the ultimate secure way of processing forms data and send it to your inbox. All user submitted data is sanitized with any hack attempts blocked. You can use PHPMailer-FVE as a single script solution or use the entire suite that includes a robust Plugin architecture for post-processing the user submitted data. As a single script solution, PHPMailer-FVE will send using PHP mail(). In short: PHPMailer-FVE is the safest and most efficient way of processing user submitted data in your forms.

Without any other variables or settings, PHPMailer-FVE can handle one single attachment or multiple attachments.

Anyone can use PHP code to get the form input data. But you also have to validate that data, and format it in a sensible way to email or store in a database. Then you have to use PHP code to send the email either as a text message or as an attachment. The coding and testing process can be a nightmare. With PHPMailer-FVE it is as simple as detecting the form submission, setting one variable (the email address where the email should be sent) and call PHPMailer-FVE.php. That’s it.

PHPMailer-FVE is now a class.

Single File Use

PHPMailer-FVE is really easy to use. All it takes is one single variable: the recipient‘s email address. Here is an example of the entire section to process your form. Throughout this tutorial, we will be referring to a form. For the purpose of an example, we are assuming the form to be located and named:

Support - Where do I get help?

PHPMailer-FVE is open source and published under GPL3. Most of the questions are answered within this tutorial, but some questions may remain. PHPMailer-FVE has its own homepage on SourceForge and you can request support there.