Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to send a mail using php ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 130
    Comment on it

    In this blog we will see how to send a "Simple Text Email" ?

    The Php mail( ) function is used to send Emails in PHP.
    There are three main parameters we have to pass for sending a simple email and one is optional parameter.

    There 3 parameter are following:-

     1- To-(This is specify the email address to send means receiver email.
    2-Subject of mail(This is specify the email subject).
    3-Content/message(This is specify the message or content of email)

    So all the above parameter is very important to send a simple text email

    you can take belloe example for better understanding:

    <?php
    
    // here define the mail of receiever
    $to="example@gmail.com";
    
    // write here subject of the mail
    $subject = "Hi";
    
    //write here contents/message of the mail
    $message = "Hello i hope you are well";
    
    $headers .= "From: simple text email";
    
    mail($to, $subject, $message, $headers);
    
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: