Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • PHP mail() function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 42
    Comment on it

    To send email in PHP, we use mail() function. You can send text message, html message and attachment with message by the use of PHP mail() function.


    bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

    $to specifies receiver or receivers of the mail. The receiver must be specified one of the following forms.,
    represents subject of the mail.

    represents message of the mail to be sent.

    PHP mail Example

       $to = "";
       $subject = "This is subject";  
       $message = "This is simple text message.";  
       $header = " \r\n";  
       $result = mail ($to,$subject,$message,$header);  
       if( $result == true ){  
          echo "Message sent successfully...";  
          echo "Sorry, unable to send mail...";  

 0 Comment(s)

Sign In

Sign up using

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: