senmdmail PHP version 4 instructions
------------------------------------

Instructions created and last updated April 24, 2026

Description:
This is a free web page email form for your website.
It's called "senmdmail PHP" and it's version 4. It includes the server side PHP code (a .php PHP file) and a template contact form (a .htm HTML file). Created by Jacob Persico the owner and webmaster of Delta Fox Design and provided Open Source under the "DFD Whatever 1.2" license. Note that version 4 is the first version publicly released. This started as a web page email form I created just for my company Delta Fox Design. But I decided to share it.
This software is available at: https://www.deltafoxdesign.com/software/

Let me know what you think:
If you decide to download this or you obtain it some other way then let me know if you found it useful:
https://www.deltafoxdesign.com/contact

IMPORTENT

Instructions:
1. Extract the compressed file "sendmail-php-4.zip".
2. Read and agree to the license "DFD Whatever 1.2 license.txt".
3. Copy "DFD Whatever 1.2 license.txt" onto your server.
4. In the comment change
See: https://www.example.com/DFD%20Whatever%201.2%20license.txt
To point to the proper web address on your server by replacing "www.example.com" with your domain name.
5. As a security measure you should ensure your contact form can only post to the .php using SSL/TLS (https) unless you are using Tor. If you are using Tor then this is optional because Tor already includes encryption. If you are not using Tor then you can get free SSL/TLS from https://letsencrypt.org/ (Hint: If your domain name does not end in .onion, then you are not using Tor.)
   You can ensure users only use SSL/TLS by creating a redirect from non SSL/TLS (http) to SSL/TLS (https) or editing the .htm file to point to the .php file using a full path including the "https://" (for example: "https://www.example.com/sendmail.php").
6. Proceed to "Important note", "Installing sendmail.php" and "Installing the form it's self".

Important note: In the code I included links to the CSS file "main.css" which is not included. So you can create the "main.css" file yourself or if your main CSS file has a different name then change it in these links. If you don't include this CSS file you can comment out these links.
The links are in the "head" and are:
<link href="main.css" type="text/css" rel="stylesheet" />
(One link in the PHP file and one link in the HTML file.)

Installing sendmail.php:
In the .php file do the following:
1. Replace EXAMPLE.COM with your domain name all uppercase. (in title and h1)
2. Replace example.com in "domain" variable.
3. Replace example.com in "contact" variable and even this whole email address if you need to.
4. Save the file and then copy it onto your server.

Change to make if you are using a shared domain for your email (for example gmail.com):
(IF THIS IS NOT THE CASE, SKIP THIS SECTION.)
NOTE If you are using a shared domain name for your email address (like gmail.com) then you have to make the following changes to the .php file because the .php file was not made for that:
(Warning: This procedure is untested! Test it yourself. While testing you should also check the source code of the web page the .php file produces.)
1. Under Variables:
Change:
  $to=$_POST["to"];
to
  $to='username@';
Where username is the part before the @ in your email address.
Example:
  $to='johndoe@';
and change:
  $domain='example.com';
to the shared domain.
Example:
  $domain='gmail.com';
2. Under Variables:
Change:
  $contact='webmaster(AT)example.com';
to your encoded email address.
Example:
  $contact='johndoe(AT)gmail.com';
3. Change:
        $vResult2=mail($from, 'Copy of email: '.$subject, $body2, 'From: do-not-reply@'.$domain);
to:
        $vResult2=mail($from, 'Copy of email: '.$subject, $body2, 'From: do-not-reply@example.com');
Where example.com is your actual website domain name.
(This email address does not have to actually exist.)
4. Change:
(put "<?php echo $domain; ?> email form" in the <b>subject</b>)
to:
(put "example.com email form" in the <b>subject</b>)
Where example.com is your actual website domain name.
5. Save the file and then copy it onto your server.

Installing the form it's self (the .htm HTML file):
contact.htm is just a template you can use to start with for your contact form. It needs a menu or breadcrumbs so people visiting your website can navigate back to your home page or you can put a link to "./" (example: <a href="./">Home</a>).
You must:
1. In the comment change
See: https://www.example.com/DFD%20Whatever%201.2%20license.txt
To point to the proper web address on your server by replacing "www.example.com" with your domain name.
  Note: You may want to change this copyright notice to mention that your contact form is a derivative work of "Example contact form". This way it is clear that anything added is your intellectual property.
2. In title and h1 replace "Example" with the name of your website.
3. Change the other two occurrences of "example.com" with the domain name you use for your email.
4. If you don't use "info" and "webmaster" as your email user names you should change this.
You can also change it to just one email address.
For example if you only use johndoe@example.com you can change:
   <td><select name="to" id="to">
      <option value="info@">info AT example.com</option>
	  <option value="webmaster@">webmaster AT example.com</option>
   </select></td>
to
<td>johndoe AT example.com<input type="hidden" name="to" id="to" value="johndoe@" /></td>
5. Save the file and then copy it onto your server.

Finally: Test it to make sure it all works.
And that's all. :-)

This web page email form is brought to you by Delta Fox Design. My name is Jacob Persico and I am the owner and web master. Check us out for more software and tips at https://www.deltafoxdesign.com/
