mayanksrmcem
09-04-2006, 12:57 AM
hi friends,
I need ur help.
I want to send emails through php code.
but there are some problems n i'm not able to understand the actual problems.
the code , i've used is as followes----
<?php
if (isset($_REQUEST['tsend']))
{
$to=$_REQUEST['tto'];
$sub=$_REQUEST['tsub'];
$mail=$_REQUEST['tmail'];
$mail=@mail($to,$sub,$mail,"mayank13dec@gmail.com");
if(!$mail)
{
$error = 'Error sending message!';
echo $error;
}
else
echo "mail send";
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
<table>
<tr>
<td>
<input type="text" name="tto">
</td>
</tr>
<tr>
<td>
<input type="text" name="tsub">
</td>
</tr>
<tr>
<td>
<textarea name="tmail"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" name="tsend" value="send">
</td>
</tr>
</table>
</form>
</body>
</html>
but after run the program the only error msg will be disply.
help me for solve this problem.
thanx
I need ur help.
I want to send emails through php code.
but there are some problems n i'm not able to understand the actual problems.
the code , i've used is as followes----
<?php
if (isset($_REQUEST['tsend']))
{
$to=$_REQUEST['tto'];
$sub=$_REQUEST['tsub'];
$mail=$_REQUEST['tmail'];
$mail=@mail($to,$sub,$mail,"mayank13dec@gmail.com");
if(!$mail)
{
$error = 'Error sending message!';
echo $error;
}
else
echo "mail send";
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
<table>
<tr>
<td>
<input type="text" name="tto">
</td>
</tr>
<tr>
<td>
<input type="text" name="tsub">
</td>
</tr>
<tr>
<td>
<textarea name="tmail"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" name="tsend" value="send">
</td>
</tr>
</table>
</form>
</body>
</html>
but after run the program the only error msg will be disply.
help me for solve this problem.
thanx