Free PHP HTML Email Starter Script

This script will help you add a versatile and extensible PHP-based HTML email script for any project you may have. This email script has been setup and tested for use with UTF-8 characters.


  • UTF-8 characters are not a problem
  • Used on many of my own sites
  • Easy to read & easy to expand upon
  • The ability to send attachments is not setup


Unzip the contents of the zip file into a folder on your web server. Edit the email_functions.php file to properly set the properties of your business (name, from email, etc.). Next, include that file in the script you are using and call it like so:

$status = sendmail($to, $subject, $message, $from);

$from is optional and it’s default value is set at the top of the email_functions.php file.
$status will be either true or false depending on if the email worked or not.


You can download this script here: (2KB) (105 downloads) Flatlogic Admin Templates banner

What is my IP Address?

Your IP Address is:


Read more on the $_SERVER variable.

$ip_address = $_SERVER['REMOTE_ADDR'];


You need to call a server-side script to accomplish this. First create a PHP file on your server and paste this in it:

header('content-type: application/json; charset=utf-8');

$data = json_encode($_SERVER['REMOTE_ADDR']);
echo $_GET['callback'] . '(' . $data . ');';

Next, use this JavaScript to call the PHP file you created above.

<script type="application/javascript">
function getip(json){
    alert(json); // alerts the ip address
<script type="application/javascript" src="" ></script>

Flatlogic Admin Templates banner