Mail Function Definition

Posted on Updated on

Mail Function Definition

Mail function () :- Php mail function is use to send the mail to the user.we can send the mail throw the simple lines of code.php provide the mail function mail(); We pass the parameter to the mail function like to the user where we send message and subject. The simple steps to make the mail function is create the layout with html and css and validation with jquery or java script .than pass the value to the PHP code like send mail to subject and message.

When we get the value into the variable the we will pass it to the mail function parameter. Its works online.

Syntax:

mail(to id,subject of mail,message which we will write,headers include content type and send mail from);

Example

<form action=”pag3ename.php” method=”post”>

<input type=”text” name=”mail-to” placeholder=”send mail to”>

<input type=”text” name=”subject” placeholder=”mail subject”>

<textarea placeholder=”write the message ” name=”message”></textarea>

<input type=”submit” name=”send” value=”send”>

</form>

<?php

$to =$_POST[‘mail-to’];

$subject = $_POST[‘subject’];

$message = $_POST[‘message’];

$headers = “MIME-Version: 1.0” . “\r\n”;

$headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”;

$headers .=’From: <from_mail@gmail.com> . “\r\n”;

mail($to,$subject,$message,$headers);

echo “mail send successfully thank You”;

}

?>

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.

Helpline: 9814666333, 8699444666

Email:info@technocampus.co.in

**************************************************************************************************************

Please fill the FORM and we shall contact you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s