- Help Center
- Hosting
- What is PHP Mailer and how can I integrate it?
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"); ?>
Input parameter
Thereby you can find the following input parameter:
subject | Subject of the mail (optional) |
recipient | E-Mail Adr. of the addressee |
contains | List of those fields, which will be inserted in the content of the e-mail |
requires | Fields, which CAN NOT be empty (optional) |
from | E-Mail Adr. of the of the sender (optional) |
charset | Character set of the e-mail (optional) |
message_success | Report after a sucessful delivery (optional) |
message_fail | Report 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("moniker_send_mail.inc.php"); ?>
</body>
</html>