<html>
<body>
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("[email protected]", $subject,
$message, "From:" . $email);
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text'><br>
Subject: <input name='subject' type='text'><br>
Message:<br>
<textarea name='message' rows='15' cols='40'>
</textarea><br>
<input type='submit'>
</form>";
}
?>
</body>
</html>
This wil help you
On Tue, Aug 6, 2013 at 3:04 PM, Karthikeyan A.K <[email protected]> wrote:
> Hope this will help
>
> http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
>
>
> On Tue, Aug 6, 2013 at 11:02 AM, Thyagarajan தியாகராஜன் <
> [email protected]> wrote:
>
> > Hi,
> >
> > We do not encourage spoon feeding.
> > There are dine and dozen examples of code to send mail from PHP.
> > If google search engine does not return the desire result, please
> > learn how to form the query better.
> >
> > regards,
> >
> > Thyagarajan Shanmugham
> > _______________________________________________
> > ILUGC Mailing List:
> > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> > ILUGC Mailing List Guidelines:
> > http://ilugc.in/mailinglist-guidelines
> >
>
>
>
> --
> Nothing is constant
>
> Regards
>
> A.K.Karthikeyan
> http://is.gd/kblogs
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> ILUGC Mailing List Guidelines:
> http://ilugc.in/mailinglist-guidelines
>
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines