I need to send mail through html form .

Posted by Sekar.C under Others on 2/24/2014 | Points: 10 | Views : 1989 | Status : [Member] | Replies : 1
I have html contact form it call send.php file for send mail but not send mail
Please give any idea to send mail.
For your reference attached same code .
My contact form:
<table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
<td><strong>Contact Form </strong></td>
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<td><form name="form1" method="post" action="file send.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<td width="16%">Subject</td>
<td width="2%">:</td>
<td width="82%"><input name="subject" type="text" id="subject" size="50"></td>
<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>
<td><input name="name" type="text" id="name" size="50"></td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
<td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td>
file send.php:

// Contact subject
$subject =$_POST["subject"];

// Details

// Mail of sender

// From
$header="from: $name <$mail_from>";

// Enter your email address
$to ='xxxxxx@yopmail.com';

// Check, if message sent to your email
// display message "We've recived your information"
echo "We've recived your contact information";
else {
echo "ERROR";



Posted by: Vuyiswamb on: 4/17/2014 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Create a Web api that sends an email and use a fuction like i did here


and call that web api in JQuery lie i did here


it should work

Thank you for posting at Dotnetfunda

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response