First, load the CodeIgniter’s email library through the following code snippet:
$this->load->library('email');
Set Email Parameters
The next step is to setup the required fields for the custom email. these fields could be setup through several functions including: from() function takes two parameters – the email address of the sender and the name. to() function takes the email address of the recipient. Next two functions are subject() and message() that round up the requirements for sending emails in CodeIgniter. Here is how these functions are used in the code:
Load CodeIgniter’s Email Class
First, load the CodeIgniter’s email library through the following code snippet:
Set Email Parameters
The next step is to setup the required fields for the custom email. these fields could be setup through several functions including: from() function takes two parameters – the email address of the sender and the name. to() function takes the email address of the recipient. Next two functions are subject() and message() that round up the requirements for sending emails in CodeIgniter. Here is how these functions are used in the code: