$this->email->from('[email protected]', 'Tom Webmaster');
$this->email->to('[email protected]', 'Freddie Fakeperson');
$this->email->subject('Your Account Is Active');
$this->email->message('Welcome to our new site!');
In the 'from' method, the first parameter is the email address your are sending from, the second parameter is the name you'd like the receiver to see.
In the 'to' method, you define who the email is being sent to.
The 'subject' method defines the subject of the email.
The 'message' method defines what will be in the body of your email.
Any of these could be a data that was sent to your site by a user. So you may have a variable in here that holds posted data. So they may look more like this:
$this->email->to($email, $username);