Send Email using PHP – TechnoGripper India

August 8, 2017
11 Shares 147 Views
Like
Like Love Haha Wow Sad Angry
3

Today, TechnoGripper India comes with an example to send email using PHP Script. For sending emails, PHP must be configured perfectly in php.ini file.

In PHP, You can send an email by using predefined PHP Function – mail(). This function needs 3 mandatory arguments that include the receiver’s mail id, a subject for the mail and the actual message content of the mail additionally there are two more variables that are non-mandatory.

Here are details of all the five functions:
to: Receiver Email ID
subject: Subject Line of the Email Message
message: Defines the message content to be sent to the Email
headers: Specifies additional headers, like From CC, BCC. Or if you want to send HTML email then also you need to use headers as a parameter. It should be CRLF separated
parameters: Specifies an additional parameter to send email using mail()




Here is Syntax to Send Email using PHP:

If your script sent email successfully then the function mail() returns true otherwise it will return false.

That’s All to Send Email using PHP.
Any Query, Send us an Email at info@technogripper.net. We are always there to help volunteers and passionate peoples.

Like
Like Love Haha Wow Sad Angry
3

Comments

comments

Leave a Comment

Your email address will not be published.