What is PHP Mailer and how to integrate?

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("dd24_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)

Example

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'>

</form>

Example: Send e-mail

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

<html>
<body>

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

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

</body>
</html>

Was this article helpful?

Help us to become even better and reviewing this page!