CI_Encrypt::encode_from_legacy()

encode_from_legacy($string[, $legacy_mode = MCRYPT_MODE_ECB[, $key = '']]) Parameters: $string (string) – String to encrypt $legacy_mode (int) – Valid PHP MCrypt cipher constant $key (string) – Encryption key Returns: Newly encrypted string Return type: string Enables you to re-encode data that was originally encrypted with CodeIgniter 1.x to be compatible with the Encrypt library in CodeIgniter 2.x. It is only necessary to use this method if you have encrypted data stored permane

CI_Email::send()

send([$auto_clear = TRUE]) Parameters: $auto_clear (bool) – Whether to clear message data automatically Returns: TRUE on success, FALSE on failure Return type: bool The e-mail sending method. Returns boolean TRUE or FALSE based on success or failure, enabling it to be used conditionally: if ( ! $this->email->send()) { // Generate error } This method will automatically clear all parameters if the request was successful. To stop this behaviour pass FALSE: if ($this->

CI_Encrypt

class CI_Encrypt encode($string[, $key = '']) Parameters: $string (string) – Data to encrypt $key (string) – Encryption key Returns: Encrypted string Return type: string Performs the data encryption and returns it as a string. Example: $msg = 'My secret message'; $encrypted_string = $this->encrypt->encode($msg); You can optionally pass your encryption key via the second parameter if you don’t want to use the one in your config file: $msg = 'My secret message'; $key = 'supe

CI_Email::to()

to($to) Parameters: $to (mixed) – Comma-delimited string or an array of e-mail addresses Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the email address(s) of the recipient(s). Can be a single e-mail, a comma-delimited list or an array: $this->email->to('[email protected]'); $this->email->to('[email protected], [email protected], [email protected]'); $this->email->to( array('[email protected]', '[email protected]', '[email protec

CI_Email::set_alt_message()

set_alt_message($str) Parameters: $str (string) – Alternative e-mail message body Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the alternative e-mail message body: $this->email->set_alt_message('This is the alternative message'); This is an optional message string which can be used if you send HTML formatted email. It lets you specify an alternative message with no HTML formatting which is added to the header string for people who do not accept HTML

CI_Email::set_header()

set_header($header, $value) Parameters: $header (string) – Header name $value (string) – Header value Returns: CI_Email instance (method chaining) Return type: CI_Email Appends additional headers to the e-mail: $this->email->set_header('Header1', 'Value1'); $this->email->set_header('Header2', 'Value2');

CI_Email::subject()

subject($subject) Parameters: $subject (string) – E-mail subject line Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the email subject: $this->email->subject('This is my subject');

CI_Email::cc()

cc($cc) Parameters: $cc (mixed) – Comma-delimited string or an array of e-mail addresses Returns: CI_Email instance (method chaining) Return type: CI_Email Sets the CC email address(s). Just like the “to”, can be a single e-mail, a comma-delimited list or an array.

CI_Email::print_debugger()

print_debugger([$include = array('headers', 'subject', 'body')]) Parameters: $include (array) – Which parts of the message to print out Returns: Formatted debug data Return type: string Returns a string containing any server messages, the email headers, and the email messsage. Useful for debugging. You can optionally specify which parts of the message should be printed. Valid options are: headers, subject, body. Example: // You need to pass FALSE while sending in order for the email

CI_Email::clear()

clear([$clear_attachments = FALSE]) Parameters: $clear_attachments (bool) – Whether or not to clear attachments Returns: CI_Email instance (method chaining) Return type: CI_Email Initializes all the email variables to an empty state. This method is intended for use if you run the email sending method in a loop, permitting the data to be reset between cycles. foreach ($list as $name => $address) { $this->email->clear(); $this->email->to($address);