Internet-Webhosting Live Chat
Knowledgebase
Sample Email Script Using PHP (For Linux & Windows Server)
Posted by - NA - on 18 November 2015 12:57 PM

This sample FORM scripts that can be used to sent out email on Linux or Windows Server using PHP with Image Verification Form.

 

Each email sending script requirest SMTP Authentication.


################################################################

NOTE : make sure contacts.php are having 2 compulsary input box with the name as  :

 1. <input name="Name" size="30">
 2. <input name="Email" size="30">

The input box 'Name' and 'Email' must exist in your forms.
Feel free to add other input box in your forms (contacts.php)

################################################################


You will need to modify the following :

1. In submit.php :

$from="youremail.com<email@youremail.com>"; //From who that will appear when this form sent out email
$smtp_host ='mail.youremail.com';       //IP or host name
$smtp_username = 'email@youremail.com'; //email user, must created in your hosting control panel first !
$smtp_password = 'your email password'; //email password, must created in your hosting control panel first !

 

// Recipient of message (This can be changed via the form itself)

$recipient = 'yourID@domainname.com'; // you email address

// Subject of message (This can be changed via the form itself)

$subject = 'CONTACTS REQUEST';

// Do not include www, just the actual domain/ip address!

$referers = array('domainname.com', 'domainname.com', 'domain3.com');

// This is the page that users will be redirected to after the form is

// processed successfully.

$success_url = 'http://www.domainname.com/contacts.php?contacts=success';

// Your site URL

$siteurl = 'http://www.domainname.com';

 

You could download the sample script Here.

(3 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Internet-Webhosting - Sales & Support System