Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Create E-mail in PHP | Mail code PHP | Sending Mail in PHP| PHP Mail Sending Code

The PHP () Mail Function:


Sending Email messages is very common for a web application, for example: sending a welcome email when a user create a new account on your website, sending newsletters to your registered users, or getting user feedback or comment through the website's contact from and many more. You can use the PHP built-in mail() function for creating and sending email messages to one or more recipients dynamically from your PHP application either in a plain-text form or formatted HTML.

Mail() function Basically used for :

mail(tosubjectmessageheadersparameters)

To: 
The Recipient's E-mail Adddress

Subject:
Your Message or Content and Pass the Parameter

Message:-

Your  Message Sent Another User your message content separated with a line feed-LF (\n). Lines should not exceed 70  characters

Headers:

This is typically used to add extra headers such as "From", "Cc", "Bcc". The additional headers should be separated with a carriage return plus a line feed-CRLF (\r\n).

Parameters:

Used to pass additional parameters

For Examples Mail Send code in PHP:



$to='someone [email protected]';//Another one E-mail

$subject='Make My Webdesign';//for example:some one content write

$mesage='HI MAKEMYWebdesign';//someone commands

$from='[email protected]';your E-mail

/// Sending Mail condition
if(mail($to,$subject,$message)){


echo'mail send successfully';

}

//mail not sending error message through condition

else{

echo'mail not send please try again';

}

You Can Try Better Out Put


All the Best!!!!

Share the post

How to Create E-mail in PHP | Mail code PHP | Sending Mail in PHP| PHP Mail Sending Code

×

Subscribe to Webdesign | Seo Services Full Tutorial | Php Full Tutorial | Javascript Full Tutorial|html,css,cms

Get updates delivered right to your inbox!

Thank you for your subscription

×