What is PHP Mailer and how can I integrate it?

Integrate PHP Mailer

This neat PHP Skript enables you to easily integrate a page to send out e-mails.
Simply integrate the script in the site which confirms the delivery of the e-mail. The filename of this page must end in .php NOT .htm NORE .html). Therein the following line must be contained:

<?php require_once("moniker_send_mail.inc.php"); ?>
This code don´t have to be deposited in the page, which contains the input fields for the e-mails.

Input parameter

Thereby you can find the following input parameter:

subjectSubject of the mail (optional)
recipientE-Mail Adr. of the addressee
containsList of those fields, which will be inserted in the content of the e-mail
requiresFields, which CAN NOT be empty (optional)
fromE-Mail Adr. of the of the sender (optional)
charsetCharacter set of the e-mail (optional)
message_successReport after a sucessful delivery (optional)
message_failReport in the case of an failed dispatch (optional)


Feed in data:

<form action='mailSend.php' method='post'>

<input type='hidden' name='from' value='info@meinedomain.de'>
<input type='hidden' name='recipient' value='addressee@mydomain'>
<input type='hidden' name='subject' value='testmail'>
<input type='hidden' name='contains' value='name, email, a text , a checkbox'>
<input type='hidden' name='requires' value='name, email'>
<input type='hidden' name='message_success' value='Email sent'>
<input type='hidden' name='message_fail' value='error '>

Name: <input name='name'><br>
Email: <input name='email'><br>
Text: <textarea name='einText'>Beispieltext</textarea><br>
click me: <input type='checkbox' name='eineCheckbox' value='gewaehlt'><br>
<input type='submit'>


Example: Send e-mail

Send e-mail and confirm dispatch (mailSend.php):


<p>Thanks for your mail!</p>

<?php require_once("moniker_send_mail.inc.php"); ?>


Was this article helpful?

Help us to become even better and reviewing this page!