How to Send Simple Emails using PHP

How to Send Simple Emails using PHP

Send emails in PHP is easier than it looks and simply use a line of code which can be done using the PHP function that enables us called mail () with the correct parameters.

The mail () function PHP has the following structure:

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

The first 3 parameters are required and correspond to:

  1. Recipient email,
  2. Title,
  3. Message.

The last parameter is optional and serves primarily to introduce the headers (From).

mail(info.email.com,Subject,Hi This is from lucidkit)

The function returns true if the email is sent successfully and false otherwise.

Lucid Kit

Related Posts
Leave a reply
Captcha Click on image to update the captcha .